Java operators
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Jamunadevi T
Used 16+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following can be operands of arithmetic operators?
Numeric
Boolean
Characters
Boolean and characters
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Modulus operator, %, can be applied to which of these?
Integers
Floating "“ point numbers
Both Integers and floating "“ point numbers.
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Decrement operator, “, decreases value of variable by what number?
1
2
3
4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class increment {
public static void main(String args[])
{
double var1 = 1 + 5;
double var2 = var1 / 4;
int var3 = 1 + 5;
int var4 = var3 / 4;
System.out.print(var2 + " " + var4);
}
}
1 1
1 0
1.5 1
1 0.2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class increment {
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}
25
24
32
36
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Output {
public static void main(String args[])
{
int x , y;
x = 10;
x++;
--x;
y = x++;
System.out.println(x + " " + y);
}
}
10 11
11 10
10 10
11 11
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What should be expression1 evaluate to in using ternary operator as in this line? expression1 ? expression2 : expression3
Integers
Floating "“ point numbers
Boolean
None of the above
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value stored in x in following lines of code?
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;
0
9
8
7
Similar Resources on Wayground
10 questions
Java Control Flow statements
Quiz
•
University
10 questions
Soạn thảo văn bản Microsoft Word
Quiz
•
1st Grade - University
7 questions
C++ Allocazione dinamica
Quiz
•
University
11 questions
Java Quiz 3 - Array
Quiz
•
University
11 questions
Binding
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
11 questions
C++ Ereditarietà
Quiz
•
University
13 questions
Continuous probability distributions
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
