QUES TION 1 Bytecode is the machine language of the JVM? True OFalse QUE S TION
ID: 3734007 • Letter: Q
Question
QUES TION 1 Bytecode is the machine language of the JVM? True OFalse QUE S TION 2 A java package is a collection of related classes. O True O False QUE S TION 3 String variables are primitive variable data types O True OFalse QUESTION 4 A loop is a control structure that causes certain statements to be executed over and over until certain conditions are met O True O False QUE STION 5 The operating system monitors the overall activity of the computer and provides services such as memory management, inputloutput activities, and storage management True O FalseExplanation / Answer
QUESTION 1
Bytecode is the machine language of the JVM?
Answer: False
Explanation: Although bytecode is similar to machine language, it is not the machine language of any actual computer. A Java interpreter is used to run the compiled Java bytecode program.
QUESTION 2
A java package is a collection of related classes
Answer: True
Explanation: java.awt is a package. A package is a collection of related classes (and possibly subpackages). Java comes with many standard packages; java.awt is one of them. It contains basic classes related to GUI programming.
QUESTION 3
String variables are premitive variable data types
Answer: False
Explanation: Java defines eight primitive types of data: byte, short, int, long, char, float, double, and boolean.
QUESTION 4
A loop is a control structure that causes certain statements to be executed over and over until certain conditions are met
Answer: True
QUESTION 5
The operating system monitors the Overall activity of the computer and provides services such as memory management, input/output activities, and storage management
Answer: True
QUESTION 6
Successfully compiling a java source file resutls in a class file?
Answer: True
QUESTION 7
Multiplication and division have the same operator order of precedence
Answer: True
QUESTION 8
Given a decimal number, the method format of the class DecimalFormat returns a string containing the digits of the number formatted
Answer: True
QUESTION 9
The value of a variable cannot change during program execution
Answer: False
QUESTION 10
In Java. && has a higher precedence than ||
Answer: True
QUESTION 11
Suppose x = 8 After the execution of the statement y = x++ y is 9 and x is 8
Answer: False
Explanation:
Program:
import java.io.*;
class A
{
public static void main(String args[])
{
int x = 8,y;
y = x++;
System.out.print("x= "+x);
System.out.print(" y= "+y);
}
}
Output: x=9 y=8
QUESTION 12
The following for loop executes 26 times.
for (int i =0; i<=50; i=i +2)
System.out.println(i);
Answer:True
Explanation:
Program:
import java.io.*;
class A
{
public static void main(String args[])
{
for (int i =0; i<=50; i=i +2)
System.out.println(i);
}
}
Output: 0 2 4 6 8 10 ...... 50
QUESTION 13
Suppose that you have the following code
int num = 5;
if (num >= 5)
System.out.println(num);
else
System.out.println(num + 5);
The output of this code is 10.
Answer: False
Explanation:
Program:
import java.io.*;
class A
{
public static void main(String args[])
{
int num = 5;
if (num >= 5)
System.out.println(num);
else
System.out.println(num + 5);
}
}
Output: 5
QUESTION 14
Suppose x = 18.9 The output of the statement — System.out.println(int(x)% 3); is 1
Answer: False
Explanation:
Program:
import java.io.*;
class A
{
public static void main(String args[])
{
double x = 18.9;
System.out.println((int)(x)% 3);
}
}
Output: 0
QUESTION 15
The expression !(x < 0) is true only if x is a positive number.
Answer: True
Explanation:
Program:
import java.io.*;
class A
{
public static void main(String args[])
{
int x=10;
if(!(x < 0))
{
System.out.println("True");
}
else
{
System.out.println("False");
}
}
}
Output: True
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.