Java 4C123  2

Java 4C123 2

Professional Development

35 Qs

quiz-placeholder

Similar activities

Arduino

Arduino

Professional Development

34 Qs

Apache Hive

Apache Hive

Professional Development

32 Qs

Certification Emerson 15 Junio

Certification Emerson 15 Junio

Professional Development

30 Qs

Technical MCQs

Technical MCQs

Professional Development

35 Qs

QUIZZ AIJ XII TKJ - BAB V - MANAJEMEN BANDWIDTH

QUIZZ AIJ XII TKJ - BAB V - MANAJEMEN BANDWIDTH

KG - Professional Development

30 Qs

CS8791-CC-WEEKLY TEST-5

CS8791-CC-WEEKLY TEST-5

Professional Development

30 Qs

Paginas Web EPO 62

Paginas Web EPO 62

3rd Grade - Professional Development

40 Qs

Regression Classification

Regression Classification

Professional Development

38 Qs

Java 4C123  2

Java 4C123 2

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Sandeep Tayal

Used 1+ times

FREE Resource

AI

Enhance your content

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

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

what is the output of this question?

class Test1 {

static int x = 10;

public

static void main(String[] args)

{

Test1 t1 = new Test1();

Test1 t2 = new Test1();

t1.x = 20;

System.out.print(t1.x + " ");

System.out.println(t2.x);

}

}

10 10

20 20

10 20

20 10

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of this question?

class Test1 {

static int i = 1;

public static void main(String[] args)

{

for (int i = 1; i < 10; i++) {

i = i + 2;

System.out.print(i + " ");

}

}

}

3 6 9

3 6 9 …. 27

Error

none

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Predict the output of the following program.


class A{

int a=40;//non static

public static void main(String args[]){

System.out.println(a);

}

}

Compilation Error

40

0

None of the above

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

predict the output

Static block

nothing prints

compile time error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

515

1020

20

30

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

static block can call non static methods with the help of object.

true

false

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

The different between static and non static method is ....

for non static method : user need to create object in a class to call a method.

A method is to perform only specific task.

There is no significant differences between static and non - static method.

Both are bounded with a class.

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?