java programming

java programming

1st - 10th Grade

20 Qs

quiz-placeholder

Similar activities

Python - ponavljanje cjeline

Python - ponavljanje cjeline

5th Grade

20 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

Q1 M3 PRE-TEST

Q1 M3 PRE-TEST

10th Grade

20 Qs

Sistemas Operativos Móviles

Sistemas Operativos Móviles

1st Grade

15 Qs

8 Общие сведения о языке программирования Python

8 Общие сведения о языке программирования Python

8th Grade

15 Qs

CSS Acronyms

CSS Acronyms

9th - 10th Grade

20 Qs

Dữ liệu trong pascal

Dữ liệu trong pascal

8th Grade

22 Qs

Pembangunan Atur Cara

Pembangunan Atur Cara

3rd Grade

18 Qs

java programming

java programming

Assessment

Quiz

Computers

1st - 10th Grade

Practice Problem

Medium

Created by

haritha rani

Used 35+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a comment in the Java language?

/ comment /

/* comment */

/ comment */

<-- comment -->

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct main() method signature in Java?

public static void main (String [] args)

public static void Main (String [] args)

public static void main (string [] args)

public static void main (String args)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable declaration in Java?

int 1myInteger = 0;

int int = 0;

Int my Integer = 0;

int myInteger = 0;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Java data type is used to store 64-bit floating-point numbers?

int

long

float

double

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The import statement used in Java to access the Scanner class is:

import java.Scanner;

import java.util.Scanner;

import java.package.Scanner

import.java.util.Scanner;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To output the square root of 25 in Java using the Math static class, the correct code would be:

Math(25 / 2)

Math(25 % 2)

Math.sqrt(25)

new Math.sqrt(25)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the problem with this code?

Line 1: String myName = "Mary Jacobson";

Line 2: System.out.println ("My name is " + myname);

Line 2: should be System.out.println ("My name is myName");

Line 2: should be System.out.println ("My name is " ) + myName;

Line 2: should be System.out.display("My name is " + myname);

There is no problem with the code

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?