Berikut adalah cara inisialisasi variabel bertipe class string, kecuali:

Pemrograman Berorientasi Obyek Part 2

Quiz
•
1st - 5th Grade
•
Hard
Agus Agvistoman
Used 2+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String me = new String(“Inisialisasi 1”);
String me;
me = new String “inisialisasi 1” ;
String me;
me = new String(“inisialisasi 1”);
String me;
me = “inisialisasi 1”;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Method yang digunakan untuk membandingkan dua buah data string adalah …
equal()
concat()
length()
equals()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Method yang digunakan untuk mengubah seluruh huruf dalam string menjadi huruf
besar/kapital adalah …
UpperCase()
toUperCase()
toUpperCase()
isUpperCase()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Perhatikan potongan program berikut :
1. public class Substring {
2. public static void main( String args[] ) {
3. String str = new String("MahaDewa");
4. System.out.println(str.substring(2));
5. System.out.println(str.substring(3,7));
6. }
7. }
Jika program di atas dijalankan maka pada baris ke 4 akan menghasilkan keluaran …
ahaDewa
h
aDewa
haDewa
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Untuk soal no. 24 dan 25, Perhatikan potongan program berikut :
1. public class Substring {
2. public static void main( String args[] ) {
3. String str = new String("MahaDewa");
4. System.out.println(str.substring(2));
5. System.out.println(str.substring(3,7));
6. }
7. }
Sedangkan hasil keluaran pada baris ke 5 adalah …
aDewa
haDewa
aDew
haDe
Similar Resources on Quizizz
8 questions
М1 У4. Вложенные конструкции

Quiz
•
1st Grade
10 questions
THIRD GRADE: THREE LETTER BLENDS or CONSONANT CLUSTERS

Quiz
•
3rd Grade
7 questions
Android 2

Quiz
•
1st - 7th Grade
10 questions
Python (введение)

Quiz
•
5th Grade
6 questions
Veri Tipleri

Quiz
•
5th Grade
10 questions
Pascal Assessment

Quiz
•
3rd - 4th Grade
10 questions
Tatasusunan

Quiz
•
5th Grade
10 questions
Consonant blends

Quiz
•
3rd Grade
Popular Resources on Quizizz
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade