Question
Which Hexadecimal number below represents 1,425 decimal? Question 26 options: 2621 1005 462 591 10110010001 Which Binary number below represents Hexadecimal 4E Question 27 options:
Which Hexadecimal number below represents 1,425 decimal?
Question 26 options:
|
2621
|
|
1005
|
|
462
|
|
591
|
|
10110010001
|
Which Binary number below represents Hexadecimal 4E
Question 27 options:
|
01100111
|
|
01001110
|
|
01000110
|
|
10000111
|
What is the output of the following code?
int x = 42; char c = h; double f = 9.1;
if ((x < 50) && (f != 10.0))
if (c == h)
System.out.print(orange);
else System.out.print (lemon);
System.out.print (lime);
Question 28 options:
|
orange
|
|
lemon
|
|
lime
|
|
orangelimelemon
|
|
orangelemon
|
|
orangelime
|
If input is 271, what is the output from the program below?
import java.util.Scanner; public class SimpleIfDemo { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer: "); int number = input.nextInt(); if (number % 5 == 0) System.out.println("HiFive"); if (number % 2 == 0) System.out.println("HiEven"); } }
Question 29 options:
|
No output printed
|
|
HiFive
|
|
HiFiveHiEven
|
|
HiEven
|
What is the output of the following code?
int i = 1;
int j = 2;
int k = 3;
if (i > j) {
if (i > k)
System.out.println("A");
}
else
System.out.println("B");
Question 30 options:
|
B
|
|
AB
|
|
A
|
|
Nothing is output
|
Given: int age = 24, weight = 140;
Which expression below is False?
Question 31 options:
|
(age > 14) || (weight >= 150)
|
|
(age > 18) && (weight >= 140)
|
|
(age <= 18) && (weight < 140)
|
|
!(weight == 150)
|
Given: int x = 1; int y = (x > 0) ? 1 : -1;
What is y?
Question 32 options:
|
-1
|
|
0
|
|
Correct answer not provided.
|
|
1
|
Given the expression 3 + 4 * 4 > 5 * (4 + 3) - 1. What does it evaluate to?
Question 33 options:
|
false
|
|
Correct answer not provided.
|
|
true
|
|
34
|
|
19
|
What will the following expression evaluate to?
Math,max(2.5, 14, 27, 20.6);
Question 34 options:
|
27.0
|
|
2.5
|
|
27
|
|
14
|
|
20.6
|
Given:
String message = "Welcome to Java";
System.out.println("The length of " + message + " is "
+ message.length());
What will be the output?
Question 35 options:
|
The length of Welcome to Java is 15
|
|
Correct answer is not provided.
|
|
The length of Welcome to Java is 14
|
|
The length of Welcome to Java is 16
|
Given:
int count = 5;
double amount = 45.64;
System.out.printf("count is %d and amount is %f", count, amount);
What would be the output?
Question 36 options:
|
count is 5.0 and amount is 45.640000
|
|
count is 5 and amount is 45
|
|
count is 5 and amount is 45.640000
|
|
Correct answer is not provided
|
What is the decimal value of hexadecimal FF41
Question 37 options:
|
65345
|
|
177401
|
|
65546
|
|
177501
|
Which of the following expression yields an integer between 0 and 100, inclusive?
Question 38 options:
|
(int)(Math.random() * 100 + 1)
|
|
(int)(Math.random() * 101)
|
|
(int)(Math.random() * 100)
|
|
(int)(Math.random() * 100) + 1
|
Escape sequence \\ is _____________.
Question 39 options:
|
Carriage Return
|
|
Correct answer not provided.
|
|
Backspace
|
|
Backslash
|
Which is not a valid statement for String text = "Welcome";
Question 40 options:
|
String text = text.substring(0,5) + "JAVA";
|
|
String text = text.substring(4,5)
|
|
All Statements are invalid
|
|
String text = text.substring(9);
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started