Skip to content

Commit 5dff716

Browse files
committed
Update README.md
1 parent 00b31cb commit 5dff716

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,6 +2636,7 @@ StringBuffer: World
26362636
#### Q. ***How can we create a object of a class without using new operator?***
26372637
Different ways to create an object in Java
26382638
* **Using new Keyword**
2639+
26392640
```java
26402641
class ObjectCreationExample{
26412642
String Owner;
@@ -2649,6 +2650,7 @@ public class MainClass {
26492650

26502651
```
26512652
* **Using New Instance (Reflection)**
2653+
26522654
```java
26532655
class CreateObjectClass {
26542656
static int j = 10;
@@ -2682,6 +2684,7 @@ class MainClass {
26822684

26832685
```
26842686
* **Using Clone**
2687+
26852688
```java
26862689
class CreateObjectWithClone implements Cloneable {
26872690
@Override
@@ -2713,6 +2716,7 @@ class MainClass {
27132716
}
27142717
```
27152718
* **Using ClassLoader**
2719+
27162720
```java
27172721
class CreateObjectWithClassLoader {
27182722
static int j = 10;

0 commit comments

Comments
 (0)