Docsity

Java Programming Quiz: Chapter 1 - Solved, Exams of Biology

Toggle sidebar
bg1
Introduction to Java
Programming: Ch. 1 quiz
fully solved 2025(graded A+)
The extension name of a java bytecode file is? - answer .class
Which of the following are the reserved words? - answer public,
static, void, class
Java was developed by? - answer sun microsystems
Analyze the following code
public class Test{
public static void main(String[] args){
System.out.println("Welcome to Java!");
}
}
&&
public class - answer
Which of the following statements is correct to display Welcome to
Java on the console? - answer System.out.println("Welcome to
Java");
Which of the following lines are Java comments? - answer /**
comment */
// comment
/*comment*/
pf3
pf4
pf5

Partial preview of the text

Download Java Programming Quiz: Chapter 1 - Solved and more Exams Biology in PDF only on Docsity!

Introduction to Java

Programming: Ch. 1 quiz

fully solved 2025(graded A+)

The extension name of a java bytecode file is? - answer .class Which of the following are the reserved words? - answer public, static, void, class Java was developed by? - answer sun microsystems Analyze the following code public class Test{ public static void main(String[] args){ System.out.println("Welcome to Java!"); } } && public class - answer Which of the following statements is correct to display Welcome to Java on the console? - answer System.out.println("Welcome to Java"); Which of the following lines are Java comments? - answer /** comment / // comment /comment*/

Suppose you define a Java class as follows: public class Test{ } In order to run this program the source code must be stored in a fine named? - answer Test.java Which of the following are storage devices? - answer hard disk, cd- rom, flash stick, floppy disk A java application must have a main method? - answer true ________ consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line. - answer Java JDK Every statement is Java ends with? - answer ; Java source code can be executed on a Java Virtual Machine? - answer false One byte has _______ bits. - answer 8 If you forget to put a closing quotation mark on a string, what kind of error will be raised? - answer a compilation error A java program block starts with an open brace { and ends with a } brace. - answer true The public classname must be the same as the filename that contains the class. - answer true

Which of the following statements is correct to display Welcome to Java on the console? - answer System.out.println("Welcome to Java"); Which of the following lines are Java comments? - answer /** comment / // comment /comment*/ Suppose you define a Java class as follows: public class Test{ } In order to run this program the source code must be stored in a fine named? - answer Test.java Which of the following are storage devices? - answer hard disk, cd- rom, flash stick, floppy disk A java application must have a main method? - answer true ________ consists of a set of separate programs for developing and testing Java programs, each of which is invoked from a command line. - answer Java JDK Every statement is Java ends with? - answer ; Java source code can be executed on a Java Virtual Machine? - answer false One byte has _______ bits. - answer 8

If you forget to put a closing quotation mark on a string, what kind of error will be raised? - answer a compilation error A java program block starts with an open brace { and ends with a } brace. - answer true The public classname must be the same as the filename that contains the class. - answer true A java interpreter is a program that translates Java source code into Java bytecode. - answer false __________ is a software that interprets Java bytecode. - answer Java virtual machine The extension name of a java source code file is? - answer .java A block is enclosed inside? - answer braces How to take in input? - answer Scanner input= new Scanner(System.in); int value = input.nextInt();