Answers |Actual Complete Exam |Already Graded A+
____________ is the physical aspect of the computer that can be seen. ✔Correct Answer-
Hardware
____________ is referred to as the brain of a computer. ✔Correct Answer-CPU
Why do computers use zeros and ones? ✔Correct Answer-because digital devices have two
stable states and it is natural to use one state for 0 and the other for 1.
One byte has ________ bits. ✔Correct Answer-8
____________ is a device to connect a computer to a local area network (LAN). ✔Correct
Answer-NIC
Computer can execute code in __________. ✔Correct Answer-machine language
___________ translates high-level language program into machine language program.
✔Correct Answer-A compiler
___________ is an operating system. ✔Correct Answer-Windows XP
_____________ is a program that runs on a computer to manage and control a computer's
activities. ✔Correct Answer-Operating system
Java was developed by _____________. ✔Correct Answer-Sun Microsystems
The main method header is written as: ✔Correct Answer-public static void main(String[] args)
Which of the following statements is correct? ✔Correct Answer-Every statement in a program
must end with a semicolon.
The JDK command to compile a class in the file Test.java is: ✔Correct Answer-javac Test.java
Which JDK command is correct to run a Java application in ByteCode.class? ✔Correct Answer-
java ByteCode
Java compiler translates Java source code into _________. ✔Correct Answer-Java bytecode
Suppose you define a Java class as follows:
, public class Test {
}
In order to compile this program, the source code should be stored in a file named ✔Correct
Answer-Test.java
The extension name of a Java bytecode file is ✔Correct Answer-.class
The extension name of a Java source code file is ✔Correct Answer-.java
Every statement in Java ends with ________. ✔Correct Answer-a semicolon (;)
A block is enclosed inside __________. ✔Correct Answer-braces
Suppose a Scanner object is created as follows:
Scanner input = new Scanner(System.in);
What method do you use to read an int value? ✔Correct Answer-input.nextInt();
If you enter 1 2 3, when you run this program, what will be the output?
import java.util.Scanner;
public class Test1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter three numbers: ");
double number1 = input.nextDouble();
double number2 = input.nextDouble();
double number3 = input.nextDouble();
// Compute average
double average = (number1 + number2 + number3) / 3;
// Display result
System.out.println(average);
}
} ✔Correct Answer-2.0
What is the exact output of the following code?
double area = 3.5;