Search Header Logo

Codean Java - Conditional

Authored by Kapten Nemo

Information Technology (IT)

University

Used 2+ times

Codean Java - Conditional
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

48 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah berikut digunakan untuk mencetak Hello World

System.out.println(Hello World);

System.out.println("Hello World");

system.out.println("Hello World");

system.out.println(Hello World);

System.Out.Println("Hello World");

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah berikut digunakan untuk mendeklarasikan variabel it bertipe byte

Byte it;

it byte;

byte it;

byte: it;

it: byte;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Pernyataan berikut yang salah

int merupakan tipe untuk bilangan bulat

double merupakan tipe untuk bilangan pecahan

String merupakan tipe yang sudah berupa struktur/kelas

boolean merupakan tipe untuk nilai logika benar-salah

char merupakan tipe untuk kumpulan karakter

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah berikut digunakan untuk mengisi nilai abc ke xyz

xyz = abc;

abc -> xyz;

abc = xyz;

abc == xyz;

xyz == abc;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah berikut digunakan untuk membaca nilai integer

Scanner sc = new Scanner(System.in);

Scanner sc = new System(Scanner);

x = sc.nextInt();

import java.util.Scanner;

int x = Scanner.nextInt();

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Scanner input = new Scanner(); Perintah tersebut menghasilkan error karena

Perintah membaca belum disimpan ke dalam variabel

Input merupakan reserved word (tercetak tebal), tidak bisa digunakan sebagai variabel

Seharusnya tidak menggunakan perintah new

Belum menggunakan fungsi nextInt()

Konstruktor Scanner() perlu diberi parameter

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah manakah yang mengeluarkan pesan kesalahan

boolean b = c > d;

double i = 6 % 3;

int a = 2 - 3 * 4;

int j = 100 / 7;

String e = 'f' + "gh";

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?