java 13-10-2023

java 13-10-2023

Professional Development

15 Qs

quiz-placeholder

Similar activities

DataBase Quiz - CME Workshop

DataBase Quiz - CME Workshop

Professional Development

20 Qs

Desafío Martes 10 de Noviembre: Veracode-Human Shield

Desafío Martes 10 de Noviembre: Veracode-Human Shield

Professional Development

15 Qs

Javascript

Javascript

KG - Professional Development

13 Qs

Arrays & Strings using C

Arrays & Strings using C

Professional Development

15 Qs

DP 203 M1

DP 203 M1

Professional Development

10 Qs

Lógica Python Revisão 1º Semestre

Lógica Python Revisão 1º Semestre

Professional Development

20 Qs

C String Array MCQs

C String Array MCQs

Professional Development

10 Qs

Computer Networks Unit-2-1

Computer Networks Unit-2-1

Professional Development

20 Qs

java 13-10-2023

java 13-10-2023

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

DEVAKI AMIR

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?