Choose the correct identifier for a method name in Java.

java 13-10-2023

Quiz
•
Computers
•
Professional Development
•
Medium
DEVAKI AMIR
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
C - Programming ( Output based - Loop )

Quiz
•
Professional Development
16 questions
Sains Komputer Tingkatan 4 - 1.6.3 Membezakan antara

Quiz
•
1st Grade - Professio...
10 questions
java 15-10-2023

Quiz
•
Professional Development
20 questions
first round quiz

Quiz
•
Professional Development
10 questions
Java SE: Programming I

Quiz
•
Professional Development
15 questions
FORMATIVE ASSESSMENT 2 OOPS

Quiz
•
Professional Development
17 questions
Java Basics

Quiz
•
Professional Development
10 questions
PreTrainingClassesObjectsMethods

Quiz
•
Professional Development
Popular Resources on Quizizz
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