
Milestone 1 - Assignments, Expression, Operators
Authored by Prema,Asst.Prof, Chennai
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of the below expression is equivalent to 16>>2 ?
16/4
16/2
16*2
16/2^2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is correct?
8>> 2 gives 2
16 >>> 2 gives 2
4 << 2 gives 2
2 << 1 gives 2
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following code snippet:
double sum = 10.0, price=100;
sum += price>=100 ? price*1.1 : price;
What value is placed in sum? Choose the most appropriate answer.
90
100
110
120
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the variables defined below:
int one = 1;
int two = 2;
char initial = ‘2’;
boolean flag = true;
Which one of the following is invalid?
if( one == two ){}
switch( one ){}
switch( flag ){}
switch( initial ){}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class TestOperator {
public static void main(String[] args)
{
byte x = 0x0F;
byte y = 0x08;
byte z = x & y;
System.out.println(z);
}
}
What is the result?
8
15
23
Compilation error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class TestExpression {
private static int value=0;
private static boolean method2(int k)
{
value+=k;
return true;
}
public static void method1(int index)
{
boolean b;
b = index >= 15 && method2(30);
b = index >= 15 & method2(15);
}
public static void main ( String args[])
{
method1(0);
System.out.println(value);
}
}
What is the output?
0
15
30
45
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given:
public class TestOperator
{
int x=15;
public void method(int x)
{
x+=x;
System.out.println(x);
}
public static void main(String... args)
{
TestOperator t = new TestOperator();
t.method(10);
}
}
What is the output of the above code?
10
20
25
30
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Java Control Flow statements
Quiz
•
University
11 questions
Java Quiz 3 - Array
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
15 questions
quiz pertemuan 2 asik ddp
Quiz
•
University
15 questions
Computer Science Quiz
Quiz
•
University
10 questions
Node.js
Quiz
•
University
10 questions
P1_APLab2Quiz_B3B4
Quiz
•
University
11 questions
DDL-SQL
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University