Minter Coder - Ders Notlarım

Chapter 1 - Soru 1
1. Which of the following method signatures is a valid declaration of an entry point in a
Java application?
A. public void main(String[] args)
B. public static void main()
C. private static void start(String[] mydata)
D. public static final v...
Read more →

Chapter 1 - Soru 2
Diagram hakkında hangi ifade doğru değildir ?
A şıkkında javada platform bağımsızlığını söylüyo ki , bununla hiç bi alakası yok.Bunu diğer şıkların mantıklı olduğunu gördüğünüzde anlayacaksınız.
B şıkkında javanın nesne tabanlı yani obje...
Read more →

Chapter 1 - Soru 3
3. What is the proper filename extension for a Java bytecode compiled file?
A. .java
B. .bytecode
C. .class
D. .dll
Derlenmiş java codunun dosya uzantısını soruyor.Java dosyalarını javac ile derleriz ve bize jvm'de executed olacak uzantısı ...
Read more →

Chapter 1 - Soru 4
Given that a Date class exists in both the java.util and java.sql packages, what is the
result of compiling the following class?
1: import java.util.*;
2: import java.sql.*;
3: public class BirthdayManager {
4: &n...
Read more →

Chapter 1 - Soru 5
5. Which of the following is not a facet of traditional object-oriented programming
languages?
A. Objects are grouped as procedures, separate from the data they act on.
B. An object can take many forms via casting.
C. An object can hold data, ...
Read more →

Chapter 1 - Soru 6
6. Which variables have a scope limited to a method?
A. Interface variables
B. Class variables
C. Instance variables
D. Local variables
Java'da 3 adet variables türü var :
Class variables , instance variables ve local variables.Örnek ile...
Read more →

Chapter 1 - Soru 7
7. Which package is imported into every Java class by default?
A. java.util
B. java.lang
C. system.lang
D. java.system
Hangi package javada her classta default olarak import edilir ? Kültür olarak değil artık hemen hemen her javacının bilme...
Read more →

Chapter 1 - Soru 8
8. Which of the following is not a valid code comment in Java?
A. // Add 5 to the result
B. /*** TODO: Fix bug 12312 ***/
C. # Add configuration value
D. /* Read file from system ****/
Hangisi geçerli bir yorum codu değildir javada ? Javada...
Read more →

Chapter 1 - Soru 9
9. Which statement about a valid .java file is true?
A. It can only contain one class declaration.
B. It can contain one public class declaration and one public interface definition.
C. It must define at least one public class.;
D. It may defi...
Read more →

Chapter 1 - Soru 10
Soru diyo ki tabloda yukarıdan aşağıya kadar kayıp değerleri doldurun.Tabloda da P1 de erişebilir değişkenlerin sayısı diyo ,
başlayalım.Class değişkeni olarak weight ve success ' a erişebilir çünkü bunlar class variables yani static keywordüne...
Read more →

Chapter 1 - Soru 11
11. Which statement about import statements is true?
A. The class will not compile if it contains unused import statements.
B. Unused import statements can be removed from the class without causing a class
to become unable to be compiled.
C. T...
Read more →

Chapter 1 - Soru 12
12. What is the result of compiling and executing the following class?
1: public class ParkRanger {
2:int birds = 10;
3:public static void main(String[] data) {
4:int trees = 5;
5:System.out.print(trees+birds);
6:}
7: }
A. It does not comp...
Read more →

Chapter 1 - Soru 13
13. Which statements about Java are true?
I. The java command can execute .java and .class files.
II. Java is not object oriented.
III. The javac command compiles directly into native machine code.
A. I only
B. III only
C. II and III
D. Non...
Read more →

Chapter 1 - Soru 14
14. Which of the following lines of code is not allowed as the first line of a Java class file?
A. import widget.*;
B. // Widget Manager
C. package sprockets;
D. int facilityNumber;
Java sınıf dosyası için en baştaki satıra hangi kod geleme...
Read more →

Chapter 1 - Soru 15
15. Which one of the following statements is true about using packages to organize your
code in Java?
A. Every class is required to include a package declaration.
B. To create a new package, you need to add a package.init file to the directory....
Read more →

Chapter 1 - Soru 16
16. Given that the current directory is /user/home , with an application Java file in
/user/home/Manager.java that uses the default package, which are the correct
commands to compile and run the application in Java?
A. javac Manager
java Manag...
Read more →

Chapter 1 - Soru 17
17. Structuring a Java class such that only methods within the class can access its
instance variables is referred to as _______.
A. platform independence
B. object orientation
C. inheritance
D. encapsulation
Bir java classının methodunun ...
Read more →

Chapter 1 - Soru 18
18. What is the output of the following code snippet?
String tree = "pine";
int count = 0;
if (tree.equals("pine")) {
int height = 55;
count = count + 1;
}
System.out.print(height + count);
A. 1
B. 55
C. 56
D. It does not compile.
tr...
Read more →

Chapter 1 - Soru 19/20
19. Which of the following is true of a Java bytecode file?
A. It can be run on any computer with a compatible JVM.
B. It can only be executed on the same type of computer that it was created on.
C. It can be easily read and modified in a stand...
Read more →

Chapter 2 - Soru 1
1. Which of the following declarations does not compile?
A. double num1, int num2 = 0;
B. int num1, num2;
C. int num1, num2 = 0;
D. int num1 = 0, num2 = 0;
Hangi bildirimler derlenmez diyo.A şıkkı derlenmez çünkü num1 den sonra ; (semicolon...
Read more →

Chapter 2 - Soru 2
2. What is the output of the following?
public static void main(String... args) {
String chair, table = "metal";
chair = chair + table;
System.out.println(chair);
}
A. metal
B. metalmetal
C. nullmetal
D. The code does not compile.
Arka...
Read more →

Chapter 2 - Soru 3
3. Which is correct about an instance variable of type String ?
A. It defaults to an empty string.
B. It defaults to null .
C. It does not have a default value.
D. It will not compile without initializing on the declaration line.
Bir String...
Read more →

Chapter 2 - Soru 4
4. Which of the following is not a valid variable name?
A. _blue
B. 2blue
C. blue$
D. Blue
javada değişken isimleri _ veya $ özel karakterlerini içerebilir veya içerisinde bir sayı içerebilir fakat bu sayı değişkenin başında başlamaması şar...
Read more →

Chapter 2 - Soru 5
5. Which of these class names best follows standard Java naming conventions?
A. fooBar
B. FooBar
C. FOO_BAR
D. F_o_o_B_a_r
Java naming conventions (java isimlendirme kuralında) class isimleri Büyük harfle başlar ve camel caseyi kullanır.
...
Read more →

Chapter 2 - Soru 6
6. How many of the following methods compile?
public String convert(int value) {
return value.toString();
}
public String convert(Integer value) {
return value.toString();
}
public String convert(Object value) {
return value.toString();
...
Read more →

Chapter 2 - Soru 7
7. Which of the following does not compile?
A. int num = 999;
B. int num = 9_9_9;
C. int num = _9_99;
D. None of the above; they all compile.
Hangisi compile edilmez diyo ? Cevap c çünkü javada sayıların karışmaması için _(underscore) kulla...
Read more →

Chapter 2 - Soru 8
8. Which of the following is a wrapper class?
A. int
B. Int
C. Integer
D. Object
Wrapper classes in java are;
int primitive türün : Integer
boolean türünün : Boolean
double = Double
...
diğer primitive türlerin de baş harfler...
Read more →

Chapter 2 - Soru 9
9. What is the result of running this code?
public class Values {
integer a = Integer.valueOf("1");
public static void main(String[] nums) {
integer a = Integer.valueOf("2");
integer b = Integer.valueOf("3");
System.out.println(a + b);
}
}...
Read more →

Chapter 2 - Soru 10
10. Which best describes what the new keyword does?
A. Creates a copy of an existing object and treats it as a new one
B. Creates a new primitive
C. Instantiates a new object
D. Switches an object reference to a new one
new keywordünün ne y...
Read more →

Chapter 2 - Soru 11
11. Which is the first line to trigger a compiler error?
double d1 = 5f; //p1
double d2 = 5.0; //p2
float f1 = 5f; //p3
float f2 = 5.0; //p4
A. p1
B. p2
C. p3
D. p4
hangi satırda en başta derleme hatası olur.p4 çünkü f2 değerinde varsay...
Read more →

Chapter 2 - Soru 12
12. Which of the following lists of primitive types are presented in order from smallest to
largest data type?
A. byte , char , float , double
B. byte , char , double , float
C. char , byte , float , double
D. char , double , float , bigint
...
Read more →

Chapter 2 - Soru 13
13. Which of the following is not a valid order for elements in a class?
A. Constructor, instance variables, method names
B. Instance variables, constructor, method names
C. Method names, instance variables, constructor
D. None of the above: a...
Read more →

Chapter 2 - Soru 14
14. Which of the following lines contains a compiler error?
String title = "Weather"; // line x1
int hot, double cold; // line x2
System.out.println(hot + " " + title); // line x3
A. x1
B. x2
C. x3
D. None of the above
Hangi satır derlem...
Read more →

Chapter 2 - Soru 15
15. How many instance initializers are in this code?
1:public class Bowling {
2:{ System.out.println(); }
3:public Bowling () {
4:System.out.println();
5:}
6:static { System.out.println(); }
7:{ System.out.println(); }
8:}
A. None
B....
Read more →

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

Chapter 2 - Soru 17
17. What is true of the finalize() method?
A. It may be called zero or one times.
B. It may be called zero or more times.
C. It will be called exactly once.
D. It may be called one or more times.
Finalize methodu arkadaşlar , bir nesne garb...
Read more →

Chapter 2 - Soru 18
18. Which of the following is not a wrapper class?
A. Double
B. Integer
C. Long
D. String
Wrapper classlarla ilgili bir soru daha vardı bu chapterda.Orda açıkladım bu soruyu geçiyorum cevap D çünkü String bir wrapper class değildir.
Read more →

Chapter 2 - Soru 19
On numara beş yıldız soru kafadan yapıyorsanız artık süpersiniz diyecem :) Kağıt kaleminizle yapmaya çözmeye çalışın çok daha iyi olacaktır.Cevabını cevap anahtarından alıp bırakmak istiyorum çok anlamlı bir şekilde açıklanmış ;
C. Lines 15–17 ...
Read more →

Chapter 2 - Soru 20/21
20. Which type can fill in the blank?
_______ pi = 3.14;
A. byte
B. float
C. double
D. short
Hangisiyle doldurulabilir ? İnce bi soru görürseniz eğer sıkıntı yok , float ve double kısmını.Byte ve short da olmayacağını biliyorsunuz onlar ...
Read more →

Chapter 2 - Soru 22/23
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 →

Chapter 2 - Soru 24/25
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 →

Chapter 2 - Soru 26/27
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 →

Chapter 2 - Soru 28
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 →

Chapter 2 - Soru 29
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 →

Chapter 2 - Soru 30
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 →

Chapter 2 - Soru 31/32
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 →

Chapter 2 - Soru 33/34
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 →

Chapter 2 - Soru 35
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 →

Chapter 2 - Soru 36
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 →

Chapter 2 - Soru 37
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 →

Chapter 2 - Soru 38
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 →

Chapter 2 - Soru 39
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 →

Chapter 2 - Soru 40/41
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 →

Chapter 2 - Soru 42
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 →

Chapter 2 - Soru 43
43. Which of the following is the output of this code, assuming it runs to completion?
package store;
public class Toy {
public void play() {
System.out.print("play-");
}
public vo...
Read more →

Chapter 2 - Soru 44
44. Which is the most common way to fill in the blank to implement this method?
public class Penguin {
private double beakLength;
public static void setBeakLength(Penguin p, int b) {
&nbs...
Read more →

Chapter 2 - Soru 45
45. Fill in the blanks to indicate whether a primitive or wrapper class can be assigned
without the compiler using the autoboxing feature.
_______first = Integer.parseInt("5");
_______second = Integer.valueOf("5");
A. int , int
B. int , Integ...
Read more →

Chapter 2 - Soru 46
46. How many objects are eligible for garbage collection right before the end of the main
method?
1:public class Person {
2:public Person youngestChild;
3:public static void main(String... args) {
4:
5:Person elena = new Person();
6:Per...
Read more →

Chapter 2 - Soru 47
47. Which is a valid constructor for this class?
public class TennisBall {
}
A. public TennisBall static create() { return new TennisBall(); }
B. public TennisBall static newInstance() { return new TennisBall():}
C. public TennisBall() {}
D....
Read more →

Chapter 2 - Soru 48
48. Which of the following is not a possible output of this code, assuming it runs to
completion?
package store;
public class Toy {
public void play() {
System.out.print("play-");
}
public void finalize() {
&...
Read more →

Chapter 2 - Soru 49
49. Which converts a primitive to a wrapper class object without using autoboxing?
A. Call the asObject() method
B. Call the constructor of the wrapper class
C. Call the convertToObject() method
D. Call the toObject() method
Şıklardan hangi...
Read more →

Chapter 2 - Soru 50
50. What is the output of the following?
package beach;
public class Sand {
public Sand() {
System.out.print("a");
}
public void Sand() {
...
Read more →