29
This is Java Jeopardy

This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

Embed Size (px)

Citation preview

Page 1: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

This isJava Jeopardy

Page 2: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

Java Basics Output String

LiteralsVariables Data Random

1 1 1 1 1 1

2 2 2 2 2 2

3 3 3 3 3 3

4 4 4 4 4 4

To Final Jeopardy

Page 3: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is Helloworld. (with no space between the two words)?

This would be the output of the following:

s.o.p. (“Hello” + “world.”);

Back to BoardBasics 1

Page 4: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is constant?

Variables that will not change in your program should be of this type.

Back to BoardBasics 2

Page 5: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is %?

This operator returns the remainder of a division problem.

Back to BoardBasics 3

Page 6: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is “ , ( , {?

These three symbols require a closing symbol if you want to use them without generating an error.

Back to BoardBasics 4

Page 7: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is print?

This method prints data on one continuous line.

Back to Board

Output1

Page 8: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is logical?

An error in a program that works but produces the incorrect result is this type of error?

Back to BoardOutput 2

Page 9: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is after the string is printed?When using the println method at

what point does the program return down a space.

Back to BoardOutput 3

Page 10: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is 2?

How many lines would be in our output from the following call to print?

System.out.println System.out.printSystem.out.printSystem.out.println

Back to BoardOutput 4

Page 11: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is string concatenation?This allows us to split a character

string that does not fit on one line of the program.

Back to BoardString Literal 1

Page 12: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is 24 and 45 concatenated: 2445? What will be the result of the following

string concatenation:System.out.println (“24 and 45 concatenated:” + 24 + 45);

Back to BoardString Literals 2

Page 13: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is \“?

This escape sequence provides a double quotation mark around a string.

Back to Board

String Literal 3

Page 14: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is compareTo?

Programmers use this to tell whether one string comes before another alphabetically.

Back to Board

String Literals 4

Page 15: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is a variable?

The name for a location in memory that is used to hold a data value.

Back to BoardVariables 1

Page 16: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is a boolean?

This type of variable has only two values (True or False).

Back to BoardVariable 2

Page 17: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What are constants?

This type of variable is signified by the use of all upper case letters.

Back to BoardVariable 3

Page 18: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is an assignment statement? The following represents what kind of

statement?

Sides = 10

Back to BoardVariable 4

Page 19: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is a mathematical/arithmetic expression? This type of expression is a combination

of operators and operands.

Back to Board

Data 1

Page 20: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is 11?

The solution for the following expression would be what?

result = 10 + (8 / 2 )%3

Back to BoardData 2

Page 21: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is an integer?

When you divide an integer by an integer your answer is this type of number.

Back to BoardData 3

Page 22: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is 2.0?

What would the answer be to the following formula:

Int x = 30

Int y = 12

Double z = x/y

Back to BoardData 4

Page 23: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is a cast?

We must use this when committing a narrowing conversion.

Back to BoardRandom 1

Page 24: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is public static void main (String[ ] args)?

This line comes immediately after Public Class header.

Back to BoardRandom 2

Page 25: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What is syntax error?

This type of error is noticed during compile time such as missing a semicolon.

Back to BoardRandom 3

Page 26: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

What are letters, numbers, underscore, and $? Can not begin with #.

A valid Java identifier (variable name) may include these four things. Which can it not begin with?

Back to BoardRandom 4

Page 27: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

Final Jeopardy Category

Variables

make your wagers

Page 28: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

Let’s see your answers.

What are the four main types of variables?

Begin Now.

Page 29: This is Java Jeopardy Java Basics Output String Literals VariablesDataRandom 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222 3333 3333 3333

IntDoubleStringboolean