InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Exam/Quiz/Trivia tests your Java Programming Skills on Java Literals or Constants. Literal types are nothing but data types. This test displays answers after finishing the exam for review. You can easily clear Competitive Exams and Job Interview Questions after attending this exam. Go through Java Theory Notes on Literals before attempting this test. All the Best Challenge SCORE0 / 20Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*Q Buttons 1) What is Literal in Java? A) Literal is the value that is given or assigned to a variable. B) Literal is a data type C) Literal is similar to String D) None of the above 2) What are the types of Literals available in Java language? A) Integer and Float B) Character and String C) Boolean D) All the above 3) What are the types of Integer Literals in Java? A) Decimal Literals B) Octal and Hexadecimal Literals C) Binary Literals D) All the above 4) Choose correct examples of decimal literals in Java. A) int a = 12345; B) int a = 12_3__5; C) long a = 987____654_3__21L; D) All the above 5) An Octal number is Java is represented with a leading ____? A) O (Alphabet) B) 0 (ZERO) C) 0x D) 0X 6) Choose correct ranges for Decimal, Octal and Hexadecimal numbers in Java? A) Decimal: 0 to 9 B) Octal: 0 to 7 C) Hexadecimal: 0 to 9 and A to F / a to f D) All the above 7) Choose the correct example of Octal Literal in Java? A) short = 0564; B) int = 076__45_2; C) int = 0______11; D) All the above Ad 8) What is the prefix used to represent Hexadecimal numbers in Java? A) 0x B) 0X C) A and B D) None of the above 9) Choose correct examples of Hexadecimal literals in Java? A) long a = 0X987654321L; B) int a = 0x76FE____23; C) byte b = 0X0__________F; D) All the above 10) Binary literals in Java are introduced with which version of Java? A) JDK 5 B) JDK 6 C) JDK 6 D) JDK 8 11) Underscore symbols in literal numbers are introduced with which version of Java? A) JDK 5 B) JDK 6 C) JDK 7 D) JDK 8 12) What is the prefix used to represent Binary literals in Java? A) b or B B) 0b or 0B C) xB or xb D) ob or oB 13) What is the correct representation of using Binary literals in Java? A) int a = 0b1010; B) int a = 0B1011_1010; C) int a = 0B0______________1; D) All the above 14) What is the compiler error for improperly using Underscores ( _ ) in literals in Java? A) Underscores are out of range B) IllegalUnderscoresException C) Underscores have to be located within digits D) Too many Underscores Ad 15) Choose a correct rule for using Underscores in literals of Java language. A) Underscores cannot come at the end of a number or next to the last digit of a number. B) Underscores cannot come at the beginning of a number or before the first digit of a number. C) Underscores cannot come before or after a decimal point in real numbers like float and double. D) All the above 16) What is the maximum number of Underscore characters that can be used in between the digits of a numeric literal in Java? A) 8 B) 16 C) 32 D) No Limit 17) Java uses UTF-16 Unicode format to represent characters. What is UTF? A) Universal Transcript Format B) Universal Transformation Format C) Universal Technology Format D) None of the above 18) What is the name given to character literals in Java that start with a Back Slash character? A) Back Slash Sequence B) Slash Sequence C) Escape Sequence D) Extended Sequence 19) What is the literal in Java that can be used to test whether an Object of any type is alive or not? A) alive B) liveof C) null D) 0 20) What is the common UTF standard used on the Websites for information exchange? A) UTF 16 B) UTF 8 C) UTF 32 D) None of the above FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREVPrimitive Data Types Online Test 1 NEXTLiterals or Constants Online Test 2 Certification Group ID 3845