Recap - Initialize Variables
Part of the Fundamentals section of Coddy's Java journey — lesson 12 of 73.
Challenge
BeginnerWrite code that initializes the following variables:
kwith the value88PIwith the value3.14namewith the value"bob"
Make sure you use the exact variables names and values. Remember, Java is case sensitive!
Try it yourself
public class Main {
public static void main(String[] args) {
// Type your code below
// Don't change the lines below
System.out.println("k = " + k);
System.out.println("PI = " + PI);
System.out.println("name = " + name);
}
}All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsModulo OperatorIncrement/DecrementPost Increment/DecrementArithmetic ShortcutsComparison OperatorsString Comparison5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Logical Operators Part 43Variables Part 2
ConstantsNaming ConventionsRecap - Initialize VariablesType Casting Part 1Type Casting Part 26Decision Making
If StatementIf - ElseSwitch StatementTernary OperatorRecap - If ElseNested If - Else