Java_Quiz1 - Google Forms
Java_Quiz1 - Google Forms
A) TV
B) TV Set-top box
3. Name
C) Embedded System equipment
9. Computer Viruses and Trojans are often transmitted along with which files? 1 point
Mark only one oval.
Mark only one oval.
A) J++
D) .ICO files
10. What is an Interpreter? 1 point 14. What software compiles a Java Program? 1 point
B) An Interpreter converts source code to low-level code B) JDK (Java Developer Kit)
11. What is a Compiler? 1 point 15. What software runs a Java program on a computer? 1 point
A) A Compiler converts all instructions in one go. A) JRE (Java Runtime Environment)
B) A compiler converts source code to low-level code B) JDK (Java Developer Kit)
12. What is the output of Compilation of Java Program? 1 point 16. What does JVM stands for? 1 point
13. Byte code is the result of? 1 point 17. What is Portability offered by Java language? 1 point
A) Compiling a Java file A) Small code size easy to carry occupying less disk space
B) Compiling a Class file B) Generating suitable Byte Code for each machine by the Compiler
C) Interpreting a Java File C) Ability to run the Byte on different machines producing the same behaviour
and output
D) Interpreting a Class file
D) Java does not actually provide portability
18. What is JIT in Java? 1 point 21. Every statement in Java language should end with a? 1 point
19. What is the Java command used to compile a java program hello.java 2 points 22. What is the need to mention "static" before main method? 1 point
23. What is the use of Access modifier "pubic" in Java language? 1 point
20. What is the command used to Run a Java program form Command Line or 1 point
Command Prompt or CMD? Mark only one oval.
Mark only one oval. A) To hide the main method from misuse
D) java hello.java
24. What is the default return type of a method in Java language? 1 point
A) void
B) int
C) short
25. Name of a Class, Variable, Method or an Interface in Java language is 1 point 29. Which among the following is not a valid Data Type in Java? 1 point
called?
Mark only one oval.
Mark only one oval.
A) long
A) Argument
B) bool
B) Value
C) double
C) Identifier
D) float
D) None of the above
30. Choose the number range for byte data type in Java? 1 point
26. What does a Data Type in Java refers to? 1 point
Mark only one oval.
Mark only one oval.
A) -127 to +128
A) The place where data is stored
B) -128 to +127
B) The technique how data is retreived
C) 0 to 256
C) The type or variety of data being handled for reading and writing
D) 0 to 255
D) None of the above
33. What is the size of a CHAR data type constant in Java? 1 point 37. An Octal number is Java is represented with a leading ____? * 1 point
A) 1 byte A) O (Alphabet)
B) 2 bytes B) 0 (ZERO)
C) 4 bytes C) 0x
D) 6 bytes D) 0X
34. Choose the right statement about Java Data types. 38. What is the name given to character literals in Java that start with a Back 1 point
Slash character?
Mark only one oval.
Mark only one oval.
A) Integer data types are short, int and long
B) Real number data types are float and double A) Back Slash Sequence
D) Extended Sequence
39. What is the suffix used to represent a floating point number in Java? 1 point
Mark only one oval.
Mark only one oval.
A) Literal is the value that is given or assigned to a variable.
D) Exclamations
41. What is the output of this Java snippet? 1 point 45. What is a Widening Type Conversion in Java? 1 point
int a = 0b111;
System.out.println(a); Mark only one oval.
Mark only one oval. A) Conversion of data from higher data type to lower data type
D) Compiler error
42. Choose the wrong Java code statement below. 1 point Mark only one oval.
Mark only one oval. A) Conversion of data from lower data type to higher data type
D) boolean a = 4>3?true:false;
43. Choose the wrong Java code statement below. 1 point Mark only one oval.
49. What is the output of the below Java code snippet? 1 point 52. A boolean literal in Java can be type casted to which data type? 1 point
float a = 8.2/2;
Mark only one oval.
System.out.println(a);
B) short
A) 4.1
C) int
B) 8.1
D) None of the above
C) 4
D) Compiler error
A) 25 D) -2 20 3
B) 26
C) 27
54. What is the output of the Java code snippet? 1 point
D) Compiler error
int a=10, b=6;
int c = a+b*5;
System.out.println(c);
51. What is the output of the Java code snippet? int a = 260; byte b= 1 point
Mark only one oval.
(byte)a; System.out.println(b);
A) 40
Mark only one oval.
B) 50
A) 0 C) 80
B) 4 D) Compiler error
C) 255
D) 260
A) 17.5
B) 32.5
C) 15
D) 30
A) RABBIT
B) BUNNY
C) Compiler error
Forms
https://docs.google.com/forms/d/1F6WyHf2YQ5ONlAIyPcQ0bC0CBfBjCu5WhFfSwh-95mU/edit 15/15