Procházet zdrojové kódy

Update 'README.md'

Kristofer Younger před 6 roky
rodič
revize
0bb9ffb465
1 změnil soubory, kde provedl 90 přidání a 1 odebrání
  1. 90
    1
      README.md

+ 90
- 1
README.md Zobrazit soubor

@@ -1,3 +1,92 @@
1 1
 # Week-9-Questions
2 2
 
3
-some questions for you to answer and ponder. the sooner, the better...
3
+some questions for you to answer and ponder. the sooner, the better...
4
+
5
+## A Few Java Questions
6
+
7
+* Name some OOP Concepts in Java?
8
+* What is meant by platform independence of Java?
9
+* What is the JVM ?
10
+* What is the difference between JDK and JVM?
11
+* What is the difference between JVM and JRE?
12
+* Which class is the superclass of all classes?
13
+* Why Java doesn’t support multiple inheritance?
14
+* Why is Java not a pure Object Oriented language?
15
+* What is difference between path and classpath variables?
16
+* What is the importance of main method in Java?
17
+* What is overloading and overriding in java?
18
+* Can we overload the main method?
19
+* Can we have multiple public classes in a java source file?
20
+* What is a Java Package and which package is imported by default?
21
+* What are the access modifiers?
22
+* What is the final keyword?
23
+* What is the static keyword?
24
+* What is finally and finalize in java?
25
+* Can we declare a class as static?
26
+* What is a multi-catch block in java?
27
+* What is a static block?
28
+* What is an interface?
29
+* What is an abstract class?
30
+* What is the difference between abstract class and interface?
31
+* Can an interface implement or extend another interface?
32
+* What are Wrapper classes?
33
+* What is an Enum in Java?
34
+* What are Java Annotations?
35
+* What is the Java Reflection API? Why it’s so important to have?
36
+* What is composition in java?
37
+* What is the benefit of Composition over Inheritance?
38
+* How can one sort a collection of custom Objects in Java?
39
+* What is inner class in java?
40
+* What is anonymous inner class?
41
+* What is the Classloader in Java?
42
+* What are different types of classloaders?
43
+* What is ternary operator in java?
44
+* What does super keyword do?
45
+* What are break and continue statement used for?
46
+* What is the this keyword used for?
47
+* What is a default constructor? A null constructor?
48
+* Can we have try block without a catch block?
49
+* What is Garbage Collection?
50
+* What is Serialization and Deserialization?
51
+* How does one run a JAR file through command prompt?
52
+* What is the use of System class, name an example?
53
+* What is instanceof keyword?
54
+* Can we use String with switch case?
55
+* Is Java a Pass-by-Value or Pass-by-Reference language? Explain the difference?
56
+* What is the difference between Heap and Stack Memory?
57
+
58
+## Loops
59
+Describe the features of Java for controlling the repeated execution of a block of code.
60
+Show how general uses of for, while and do could all be emulated using only loops that start of while (true).
61
+
62
+## Exceptions
63
+Describe some circumstances where it is useful for functions to return errors as exception, and some where it is not. Give an example of an algorithm which is simplified by the use of exceptions.
64
+
65
+## Big Addition
66
+Java comes with a class BigInteger that represents potentially huge numbers. Suppose it did not, or for some reason you were prohibited from using it but still needed to work with large positive integers. To fit your needs you will define a new class called Big that stores integers as arrays of byte values, where each byte holds a single decimal digit from the number being used, with the least significant digit held at position 0 in the array.
67
+Write a definition of such a class including in it methods to create a big integer from an int (provided that int is positive), to add two Big values together and to convert from a big to a String ready for printing. You need not implement any other methods unless they are needed by the ones mentioned here.
68
+
69
+## Lists in Java
70
+A list in Java can be represented as a sequence of links. Each link is an object containing one value in the list and a reference to the rest of the list following the link. A null reference indicates the end of the list.
71
+Write a Java class that can represent such lists, where the items stored in lists are of type Object. Provide your implementation with two static public methods that append lists. The first of these should be called append and should take two arguments, its result should be the concatenation of the two lists and neither input should be disturbed. The second should be called conc and should have the same interface, but it should work by altering the final reference in the first list to point it towards the second, and it should thus not need to use new at all.
72
+
73
+
74
+Some Tiny Questions
75
+1	List the eight Java primitive data types. 
76
+2	What is a class?
77
+3	Name the java access modifies for instance variable, classes and methods.
78
+4	What can an abstract class do that an interface cannot?
79
+5	What result will be printed if the following fragment of Java code is executed? Why?
80
+```
81
+System.out.println(‘h’+’e’+”llo worl”+’d’)
82
+```
83
+6	What result will be printed if the following fragment of Java code is executed? Why? 
84
+```
85
+    double d = 6.6; 
86
+    try
87
+        { d=1.0/0.0; }
88
+    finally 
89
+        {
90
+		   System.out.println("d = " + d);
91
+        }
92
+        ```