290 likes | 386 Views
Test your Java programming knowledge with this fun quiz covering variables, operators, and basic syntax. From data types to error handling, challenge yourself to see how well you know Java fundamentals.
E N D
What is Helloworld. (with no space between the two words)? • This would be the output of the following: s.o.p. (“Hello” + “world.”); Basics 1 Back to Board
What is constant? • Variables that will not change in your program should be of this type. Basics 2 Back to Board
What is %? • This operator returns the remainder of a division problem. Back to Board Basics 3
What is “ , ( , {? • These three symbols require a closing symbol if you want to use them without generating an error. Back to Board Basics 4
What is print? • This method prints data on one continuous line. Back to Board Output1
What is logical? • An error in a program that works but produces the incorrect result is this type of error? Output 2 Back to Board
What is after the string is printed? • When using the println method at what point does the program return down a space. Output 3 Back to Board
What is 2? • How many lines would be in our output from the following call to print? System.out.println System.out.print System.out.print System.out.println Back to Board Output 4
What is string concatenation? • This allows us to split a character string that does not fit on one line of the program. String Literal 1 Back to Board
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); String Literals 2 Back to Board
What is \“? • This escape sequence provides a double quotation mark around a string. Back to Board String Literal 3
What is compareTo? • Programmers use this to tell whether one string comes before another alphabetically. Back to Board String Literals 4
What is a variable? • The name for a location in memory that is used to hold a data value. Variables 1 Back to Board
What is a boolean? • This type of variable has only two values (True or False). Variable 2 Back to Board
What are constants? • This type of variable is signified by the use of all upper case letters. Variable 3 Back to Board
What is an assignment statement? • The following represents what kind of statement? Sides = 10 Back to Board Variable 4
What is a mathematical/arithmetic expression? • This type of expression is a combination of operators and operands. Back to Board Data 1
What is 11? • The solution for the following expression would be what? result = 10 + (8 / 2 )%3 Data 2 Back to Board
What is an integer? • When you divide an integer by an integer your answer is this type of number. Data 3 Back to Board
What is 2.0? • What would the answer be to the following formula: Int x = 30 Int y = 12 Double z = x/y Data 4 Back to Board
What is a cast? • We must use this when committing a narrowing conversion. Random 1 Back to Board
What is public static void main (String[ ] args)? • This line comes immediately after Public Class header. Random 2 Back to Board
What is syntax error? • This type of error is noticed during compile time such as missing a semicolon. Random 3 Back to Board
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? Random 4 Back to Board
Final Jeopardy Category Variablesmake your wagers
Let’s see your answers. • What are the four main types of variables? Begin Now.
Int • Double • String • boolean