
java 13-10-2023
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
DEVAKI AMIR
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct identifier for a method name in Java.
1show
$hide
*show$
3_click
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of any Logical operation in Java?
1 or 0
true or false
char or String
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The method parameters can be redeclared in the method body
true
false
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The private member of a class can be accessible
a) Within the class in which it is declared
b) Within all the sub-classes of its class in any package where this class is visible
c) Within all the classes in the package containing its class
both a and b
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
class c
{
private static int p1=20;
protected static int p2=40;
protected static int func1() {
return p1;
}
}
class testClass extends c{
protected static int func2() {
return p2+func1();
}
public static void main(String[] args ) {
System.out.println(func2());
}
}
60
Compilation error- The field c.p1 is not visible
40
0
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Check the below code and state whether it is called Recursion in Java?
void methodA()
{ methodB(); }
void methodB()
{ methodA(); }
TRUE
FALSE
Answer explanation
Explanation:
No, not at all. In the above code, the first method calls the second method and the second method calls the first method.
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
public class RecursionTesting {
static int num=4;
public static void main(String[] args) {
new RecursionTesting().recursiveMethod(); }
void recursiveMethod() {
num--;
if(num == 0)
return;
System.out.print(num + " ");
recursiveMethod(); } }
4 3 2 1
3 2 1
3 2 1 0
Compiler error
Answer explanation
Note that this recursive method does not return anything. It simply does the printing of some values.
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
12 questions
Operating Systems
Quiz
•
Professional Development
16 questions
Cyber Resilience Training
Quiz
•
Professional Development
10 questions
05 HTML/CSS Vertiefung
Quiz
•
Professional Development
10 questions
PreTrainingClassesObjectsMethods
Quiz
•
Professional Development
15 questions
Repaso de Python
Quiz
•
5th Grade - Professio...
12 questions
AppsLab_Q3
Quiz
•
1st Grade - Professio...
10 questions
c program -basic
Quiz
•
Professional Development
10 questions
2. Введение в язык программирования C++.
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Computers
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
100 questions
Screening Test Customer Service
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
10 questions
Reading a ruler in Inches
Quiz
•
4th Grade - Professio...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development
