public static void main(String[] args)
What does skeleton code look like?
Public class Examples
{
public static void main(String[] args)
{
System.out.println("bobo");
}
}
// What does the code print?
bobo
Public class Examples
{
public static void main(String[] args)
{
//System.out.println("bobo");
}
}
// what is the result of executing this code?
nothing will print
Public class Examples
{
public static void main(String[] args)
{
System.out.println(:P);
}
}
// what type of error does this produce
Syntax error
Public class Examples
{
public static void main(String[] args)
{
System.out.print("bobo\neats\ndc");
}
}
// what does this code execute?
bobo
eats
dc
int count = 57;
how do you declare an integer value named count with the value of 57?
double gpa = 3.9;
how do you declare a decimal value named gpa that holds a students gpa?
String name = “John Harvard”;
how do you create an object called name that holds a students' name?
count = count + 2;
OR
count+=2;
how do you change the value of an int named count up by 2?