Syntax
Variables
Methods
100

What character goes at the end of every statement?

;
100

Why do we use variables in java?

To refer to stored data values.

100

How do you declare the main method?

public static void main(String[] args) {

}

200

How do you print "Hello World!" to the console?

System.out.println("Hello World!");

200

What is the format for declaring a variable?

type variableName = value;

200

What are the two things wrong with this statement

public class Maine {  static void myMethod() {    System.out.println("Cobb Corp Goons!");  }
  public static void main(String[] args) {    myMethod();  }
}

// Goal Output "I just got executed!"

What is "public class Maine"

And

"System.out.println("Cobb Corp Goons!"); 

Does not match the goal output

300

What symbol marks the start and end of each block of code?

What is "{}"

300

How do you declare the variable (name) with the value "John"

String name = "John";

300

When a parameter is passed to the method it is called?

What is An "Argument"?

400

What kind of error is in this line of code?

And How would you fix it?

System.out.println(ElijahCobbCorporate)

What is a syntax error?

System.out.println(ElijahCobbCorporate);

400

Which multiple variable initialization is correct?


A. int x, y, z;
x = y = z = 50;


B. int x, y, z;
x == y == z == 50;

A.

int x, y, z;
x = y = z = 50;

400

which string method returns the position of the first found occurrence of specified characters in a string?

indexOf()

500

 What command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files

What is "Javac"?
500

What is wrong about this. 

int myNum = 5;
float myFloatNum = BowserVideo;
char myLetter = 'D';
boolean myBool = true;
String myText = "Hello"

float myFloatNum = BowserVideo; 

is the wrong datatype for "BowserVideo"

500

How would create an object called carsArray that returns the ArrayList "cars" as an array?

(Hint: use the toArray() method)

 Object[] carsArray = cars.toArray();

M
e
n
u