Certificación Java

Certificación Java

3rd Grade

19 Qs

quiz-placeholder

Similar activities

Этап 3

Этап 3

1st - 4th Grade

20 Qs

Tin học 11 chương I

Tin học 11 chương I

1st - 12th Grade

20 Qs

Đề thi nghề 2019-P1

Đề thi nghề 2019-P1

KG - University

20 Qs

ICT Test 2023/2024 Primary 1

ICT Test 2023/2024 Primary 1

1st - 5th Grade

20 Qs

Arduino 3er año

Arduino 3er año

3rd Grade

16 Qs

QUIZ_Pemrograman Dasar Kelas X_26Oktober2018

QUIZ_Pemrograman Dasar Kelas X_26Oktober2018

1st - 3rd Grade

15 Qs

Hardware and Software-Revision

Hardware and Software-Revision

3rd Grade

15 Qs

Réseau informatique

Réseau informatique

1st - 5th Grade

15 Qs

Certificación Java

Certificación Java

Assessment

Quiz

Computers

3rd Grade

Practice Problem

Hard

Created by

Jose Matos

Used 25+ times

FREE Resource

AI

Enhance your content in a minute

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

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Domain:Creating and Using Arrays

What will be the output of this program code?

public class Whiz{

public static void main(String[] args){

String[][] strs=new String[5][];

strs[1]=new String[2];

System.out.print(strs.length + strs[1].length);

}

}

2

7

4

A null pointer exception is thrown

Compilation fails

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be the output of this program

public class Whiz{

public static void main(String[] args){

do{

int i=1;

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

}while(i<=5);

}

}

11111

An infinite loop

compilation fails

12345

123456

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Domain Java Basics

Which of the following will import only static members of java.util.Arrays

static import java.util.Arrays;

import java.util.Arrays.*;

import java.util.Arrays;

import static java.util.Arrays;

import static java.util.Arrays.*;

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Domain Handling Exceptions

Which of the following can be inserted at line2, to make this code compilable

1. public void exc() throws FileNotFoundException{

2. // INSERT CODE HERE

3.}

throw new RuntimeException();

throw new java.io.IOException();

throw new Exception();

throw new IOException():

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Domain:Using Operators and Decision Constructs

Which of the following operator is used by Java to create an instance of class

create

instanceof

new

free

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Dornain:Using Operators and Decision Constructs

Which of the following has higher operator precedence than "/" operator

!

+

-

*

None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Domain Java Basics

Consider the following content of a source code file

import myLibrary.*;

public class Whiz{

//code for the class

}

class Lab{

//code for the class ....

}

What could be the name of the java file containing this source?

This can't be included in one source.

This can be included in any file name with having java file extension

Lab.java

Whiz.java

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

Already have an account?