JAVA operators

Quiz
•
Computers
•
University
•
Medium
Jamunadevi T
Used 35+ times
FREE Resource
10 questions
Show all answers
1.
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
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following can be operands of arithmetic operators?
Numeric
Boolean
Characters
Both Numeric & Characters
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
With x = 0, which of the following are legal lines of Java code for changing the value of x to 1?
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;
1, 2 & 3
1 & 4
1, 2, 3 & 4
3&4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Decrement operator, −−, decreases the value of variable by what number?
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these statements are incorrect?
Assignment operators are more efficiently implemented by Java run-time system than their equivalent long forms
Assignment operators run faster than their equivalent long forms
Assignment operators can be used only with numeric and character data type
None of the mentioned
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
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 0
1 1.5
1.5 1
0 1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is not a bitwise operator?
&
&=
|=
<=
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
HCI 584 Python quiz

Quiz
•
University
8 questions
C++ pointers

Quiz
•
University
15 questions
C_test1

Quiz
•
University
10 questions
Topik 2 - Query

Quiz
•
University
10 questions
C++ quiz

Quiz
•
10th Grade - Professi...
14 questions
Understanding Python Identifiers and Operators

Quiz
•
11th Grade - University
15 questions
PYTHON QUIZ - DAY 2

Quiz
•
University
10 questions
PYTHON PROGRAMMING POP QUIZ ON TOPIC 2!

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University