Java operators

Quiz
•
Computers
•
University
•
Hard
Jamunadevi T
Used 16+ times
FREE Resource
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
9 questions
C++ Puntatori

Quiz
•
University
5 questions
Java Classes & Objects

Quiz
•
University
10 questions
Python - Functions

Quiz
•
University
10 questions
BCSC0006 - Quiz 1 - Arrays

Quiz
•
University
10 questions
IT Quiz Round 3

Quiz
•
University
10 questions
Java Programming Quiz

Quiz
•
University
11 questions
SAINS KOMPUTER 1.3

Quiz
•
University
6 questions
Java Method Overloading

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University