Minter Coder's Blog

Ders Notlarım

image

Chapter 2 - Soru 42

2021-03-18
42. Fill in the blank to make the code compile: package animal; public class Cat { public String name; public static void main(String[] meow) {       Cat cat = new Cat();       ______________ = "S...
Read more →
image

Chapter 2 - Soru 40/41

2021-03-18
40. Which of the following does not compile? A. double num = 2.718; B. double num = 2._718; C. double num = 2.7_1_8; D. None of the above; they all compile. Hangisi derlenmez ? Bununla ilgili gerçekten bu chapterde 3-5 tane soru vardı hepsi...
Read more →
image

Chapter 2 - Soru 39

2021-03-18
39. Which pairs of statements can accurately fill in the blanks in this table? Variable            Type Can be called within the class from what type of method Instance      ...
Read more →
image

Chapter 2 - Soru 38

2021-03-18
38. How many of the following lines compile? int i = null; Integer in = null; String s = null; A. None B. One C. Two D. Three aşağıdakilerin kaç tanesi derlenir diyo ? öncelikle null değeri class veya complex typelara atanır yukarıda da ...
Read more →
image

Chapter 2 - Soru 37

2021-03-18
37. What does the following output? 1: public class InitOrder { 2:public String first = "instance"; 3:public InitOrder() { 4:first = "constructor"; 5:} 6:{ first = "block"; } 7:public void print() { 8:System.out.println(first); 9:} 10:...
Read more →
image

Chapter 2 - Soru 36

2021-03-18
36. Which of the following can fill in the blanks to make this code compile? _______d = new_______ (1_000_000.00); A. double , double B. double , Double C. Double , double D. None of the above Bu sorunun benzerini görmüştük bu chapterde , ...
Read more →
image

Chapter 2 - Soru 35

2021-03-18
35. How many of the String objects are eligible for garbage collection right before the end of the main method? public static void main(String[] fruits) { String fruit1 =new String("apple"); String fruit2 =new String("orange"); String fruit3 ...
Read more →
image

Chapter 2 - Soru 33/34

2021-03-18
33. Which statement is true about primitives? A. Primitive types begin with a lowercase letter. B. Primitive types can be set to null . C. String is a primitive. D. You can create your own primitive types. primitive türler hakkında hangisi ...
Read more →
image

Chapter 2 - Soru 31/32

2021-03-18
31. Which two primitives have wrapper classes that are not merely the name of the primitive with an uppercase letter? A. byte and char B. byte and int C. char and int D. None of the above Yukarıdaki soruda şıklarda bulunan primitive türler...
Read more →
image

Chapter 2 - Soru 30

2021-03-18
30. Which of the following correctly assigns animal to both variables? I. String cat = "animal", dog = "animal"; II. String cat = "animal"; dog = "animal"; III. String cat, dog = "animal"; IV. String cat, String dog = "animal"; A. I B. I, II...
Read more →
image

Chapter 2 - Soru 29

2021-03-18
29. Given the following code, fill in the blank to have the code print bounce . public class TennisBall { public TennisBall() { System.out.println("bounce"); } public static void main(String[] slam) { ________________________ } } ...
Read more →
image

Chapter 2 - Soru 28

2021-03-18
28. What is the output of the following? Integer integer = new Integer(4); System.out.print(integer.byteValue()); System.out.print("-"); int i = new Integer(4); System.out.print(i.byteValue()); A. 4-0 B. 4-4 C. The code does not compile. ...
Read more →
image

Chapter 2 - Soru 26/27

2021-03-18
26. Of the types double , int , long , and short , how many could fill in the blank to have this code output 0 ? static _______defaultValue; public static void main(String[] args) { System.out.println(defaultValue); } A. One B. Two C. Three...
Read more →
image

Chapter 2 - Soru 24/25

2021-03-18
24. Which of the following can fill in the blanks to make this code compile? _______d = new_______ (1_000_000_.00); A. double , double B. double , Double C. Double , double D. None of the above. Boşluğa hangilerini bırakırsak adam akıllı d...
Read more →
image

Chapter 2 - Soru 22/23

2021-03-18
22. Suppose foo is a reference to an instance of a class. Which of the following is not true about foo.bar ? A. bar is an instance variable. B. bar is a local variable. C. It can be used to read from bar . D. It can be used to write to bar . ...
Read more →