Skip to content

Commit e908568

Browse files
committed
Update readme.md
1 parent b017c60 commit e908568

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

readme.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,43 @@
1818

1919
##Classloaders and Types
2020
- [Image](images/JavaClassLoaders.png)
21-
- A Java program is made up of a number of custom classes (written by programmers like us) and core classes (which come preUpackaged with Java). When a program is executed, JVM needs to load the content of all the needed class. JVM uses a ClassLoader to find the classes.
21+
- A Java program is made up of a number of custom classes (written by programmers like us) and core classes (which come pre-packaged with Java). When a program is executed, JVM needs to load the content of all the needed class. JVM uses a ClassLoader to find the classes.
2222
- System Class Loader : Loads all classes from CLASSPATH
2323
- Extension Class Loader : Loads all classes from extension directory
2424
- Bootstrap Class Loader : Loads all the Java core files
2525
- When JVM needs to find a class, it starts with System Class Loader. If it is not found, it checks with Extension Class Loader. If it not found, it goes to the Bootstrap Class Loader. If a class is still not found, a ClassNotFoundException is thrown.
2626

2727
#Language Basics
2828
##Why do we need Wrapper Classes?
29-
- [Code](src/main/java/com/in28minutes/java/wrapper/WrapperExamples.java)
30-
- See TODO WrapperExamples.java
29+
- [Example 1](src/main/java/com/in28minutes/java/wrapper/WrapperExamples.java)
3130
- A wrapper class wraps (encloses) around a data type and gives it an object appearance
3231
- Wrapper: Boolean,Byte,Character,Double,Float,Integer,Long,Short
3332
- Primitive: boolean,byte,char ,double, float, int , long,short
34-
- Reasons
35-
- null is a possible value
36-
- use it in a Collection
37-
- Object like creation from other types.. like String
38-
39-
Are instances of Wrapper Classes Immutable?
40-
- Wrapper classes are final and immutable.
4133
- Examples of creating wrapper classes are listed below.
4234
- Integer number = new Integer(55);//int;
4335
- Integer number2 = new Integer("55");//String
4436
- Float number3 = new Float(55.0);//double argument
45-
- Float number4 = new Float(55.0f);//float argument Float number5 = new Float("55.0f");//String
37+
- Float number4 = new Float(55.0f);//float argument
38+
- Float number5 = new Float("55.0f");//String
4639
- Character c1 = new Character('C');//Only char constructor
4740
- Boolean b = new Boolean(true);
41+
- Reasons
42+
- null is a possible value
43+
- use it in a Collection
44+
- Object like creation from other types.. like String
4845

49-
What is Auto Boxing?
46+
##Are instances of Wrapper Classes Immutable?
47+
- What is Immutability?
48+
- Wrapper classes are final and immutable.
49+
50+
##What is Auto Boxing?
5051
```
5152
// Auto Boxing
5253
Integer ten = 10;//new Integer(10);
5354
ten++;// allowed. Java does had work behind the screen for us
5455
```
55-
Boxing and new instances
56-
Auto Boxing helps in saving memory by reusing already created Wrapper objects. However wrapper classes created using new are not reused.
56+
57+
- Boxing and new instances - Auto Boxing helps in saving memory by reusing already created Wrapper objects. However wrapper classes created using new are not reused.
5758
```
5859
// Two wrapper objects created using new are not same object
5960
Integer nineA = new Integer(9);
@@ -67,8 +68,9 @@ Auto Boxing helps in saving memory by reusing already created Wrapper
6768
System.out.println(nineC == nineD);// true
6869
System.out.println(nineC.equals(nineD));// true
6970
```
71+
7072
#Strings
71-
Immutability of Strings
73+
##Are String's immutable?
7274
```
7375
//Strings are immutable
7476
String str3 = "value1";
@@ -80,18 +82,18 @@ Immutability of Strings
8082
System.out.println(concat); //value1value2
8183
```
8284

83-
String vs StringBuffer vs StringBuilder
85+
##String vs StringBuffer vs StringBuilder
8486
- String is Immutable
8587
- StringBuilder is not synchronized
8688
- Performance
87-
- see TODO StringBufferBuilderExamples.java
89+
- [Example 1](src/main/java/com/in28minutes/java/string/StringBufferBuilderExamples.java)
8890

8991
#OOPS Basics
9092
Inheritance
91-
- EveryClassExtendsObject
92-
- See InheritanceExamples
93-
- See [Inheritance and Polymorphism](docs/inheritance-and-polymorphism.md)
94-
- src/main/java/com/in28minutes/java/oops/inheritance/reuse
93+
- Basics of Inheritance
94+
- Every Class Extends Object - See [Example](src/main/java/com/in28minutes/java/oops/inheritance/EveryClassExtendsObject.java)
95+
- [Example 1](src/main/java/com/in28minutes/java/oops/inheritance/InheritanceExamples.java)
96+
- Reuse Through Inheritance - [TestReuse.java](src/main/java/com/in28minutes/java/oops/inheritance/reuse/TestReuse.java) [Hero.java](src/main/java/com/in28minutes/java/oops/inheritance/reuse/Hero.java) [Actor.java](src/main/java/com/in28minutes/java/oops/inheritance/reuse/Actor.java)[Comedian.java](src/main/java/com/in28minutes/java/oops/inheritance/reuse/Comedian.java)
9597
Method OverLoading
9698
- src/main/java/com/in28minutes/java/oops/inheritance/overloading
9799
Method OverRiding

0 commit comments

Comments
 (0)