skeleton code
the basic starting point of a program
\”
What is the escape sequence for “
\\
What is the escape sequence for \
backslash
What is this “\”
forward slash
What is this “/”
\t
What escape sequence performs a tab
\n
What escape sequence moves the cursor to the next line
System.out.println();
Which print command prints the supplied text and moves the cursor to the beginning of the next line
System.out.print();
Which print command prints the text without going to the next line?`
/*
What symbol starts a multi-line comment
//
What symbol is used for a single line comment
*/
What symbol ends a multi-line comment
Comment
A(n) BLANK is a section of code that is ignored by the compiler
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?