public class Example {
public static void main(String[] args) {
String str1 = "hello";
String str2 = "world";
String result = str1 +" "+ str2;
System.out.println(result);
}
}
OOP evaluation
Quiz
•
Computers
•
University
•
Hard
pubudu s
Used 3+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class Example {
public static void main(String[] args) {
String str1 = "hello";
String str2 = "world";
String result = str1 +" "+ str2;
System.out.println(result);
}
}
helloworld
hello world
worldhello
Compilation Error
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What would the new value of A be?
A=5;
System.out.println(A++);
6
3
5
4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what's the output of below code?
public static void main(String []args){
int z =50;
System.out.println(x);
m();
}
public static void m(){
int z =55;
System.out.println(x);
}}
55,50
55,55
50,55
50,50
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output?
int x = 1;
System.out.println(++x);
1
2
compilation error
runtime error
5.
MULTIPLE SELECT QUESTION
30 sec • 2 pts
Which statement(s) are equivalent to i = i + 1?
i += 1
i--
i -= 1
i++
6.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
If a=10, b=5, c=12
Find result for : 8 * (a + b + c) – a % c
78
206
77
216
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
public class A{
int h =10;
static int p=20;
public static void main(String args[]){
int x =5;
System.out.println(x);
System.out.println(p);
System.out.println(h);
}
}
5,20,Erorr
Error
Error,5,20
5,20,10
10 questions
Inheritance
Quiz
•
University
10 questions
java operators
Quiz
•
University
15 questions
Round 4 - Harvest
Quiz
•
University
9 questions
Java Programming Structures
Quiz
•
University
8 questions
Java operators
Quiz
•
University
10 questions
Weekly Contest #3 - TechXNinjas
Quiz
•
University
11 questions
SAINS KOMPUTER 1.3
Quiz
•
University
10 questions
Java Static
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade