Skip to content

Commit a7b9008

Browse files
committed
Fix typos
1 parent d3f2fb2 commit a7b9008

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Frequently asked Java Interview questions
2525
| 16 | [What are the differences between arraylist and vector?](#what-are-the-differences-between-arraylist-and-vector) |
2626
| 17 | [What is finalize method? How do you override it?](#what-is-finalize-method-how-do-you-override-it) |
2727
| 18 | [What Is the Difference Between the Comparable and Comparator Interfaces](#what-is-the-difference-between-the-comparable-and-comparator-interfaces) |
28+
2829
<!-- TOC_END -->
2930

3031
<!-- QUESTIONS_START -->
@@ -57,7 +58,7 @@ Frequently asked Java Interview questions
5758

5859
3. ### How does JVM works
5960

60-
JVM(Java Virtual Machine) is an abstract runtime engine to run java applications. It is part of Java Runtime Environment(JRE) to execute the bytecode generated by java compilers. JVM brings WORA(Write Once Read Anywhere) behavior in which you can write java program on one system and expected to run on any java enabled systems without any modifications. Upon compiling .java file to .class file(contains byte code), .class file goes into severl steps described by JVM.
61+
JVM(Java Virtual Machine) is an abstract runtime engine to run java applications. It is part of Java Runtime Environment(JRE) to execute the bytecode generated by java compilers. JVM brings WORA(Write Once Read Anywhere) behavior in which you can write java program on one system and expected to run on any java enabled systems without any modifications. Upon compiling .java file to .class file(contains byte code), .class file goes into several steps described by JVM.
6162

6263
JVM consists of three main components:
6364

@@ -94,7 +95,7 @@ Frequently asked Java Interview questions
9495

9596
1. **Bootstrap ClassLoader:** This is a root class loader and typically represented as null. It loads the core java libraries located in <JAVA_HOME>/jmods folder like `java.lang`, `java.util` etc. This class loader is written in native code unlike other class loaders.
9697

97-
2. **Platform ClassLoader:** This class loader is responsible for loading platform classes such as Java SE platform APIs, their implementation classes and JDK-specific run-time classes. For example, the platform classess such as `java.net.http`, `java.sql`, `org.graalvm.compile`(JDK Specific).
98+
2. **Platform ClassLoader:** This class loader is responsible for loading platform classes such as Java SE platform APIs, their implementation classes and JDK-specific run-time classes. For example, the platform classes such as `java.net.http`, `java.sql`, `org.graalvm.compile`(JDK Specific).
9899

99100
3. **System/Application classLoader:** This class loader is responsible for loading all the classes configured from the classpath. The classpath can contain classes from directories, JAR files etc.
100101

@@ -150,7 +151,7 @@ Frequently asked Java Interview questions
150151
5. **Garbage Collector:** Garbage Collector(GC) is responsible to collect and remove unreferenced objects from the heap area. This memory management feature is used to reclaim the unused memory and makes free space for newer objects. This happens in two phases:
151152

152153
1. **Mark:** In this step, GC identifies the unused objects in memory
153-
2. **Sweep:** As part of this step, GC removes the objects indentified in the previous phase.
154+
2. **Sweep:** As part of this step, GC removes the objects identified in the previous phase.
154155

155156
4. **Java Native Interface (JNI) :** JNI is used as a bridge between java method calls and native libraries written in C, C++ etc. Sometimes it is required to invoke native code for specific underlined hardeware.
156157
5. **Native Method Libraries :** These are collection of native libraries(C/C++/Assembly) which are required by execution engine. These libraries loaded through JNI and represented in the form of `.dll` or `.so` files.
@@ -224,7 +225,7 @@ Frequently asked Java Interview questions
224225

225226
5. String[] args: This is an array of strings which stores arguments passed by command line while starting a program.
226227

227-
**Note:** You can create any number of main methods through overloading features. i.e, Mulitple main methods can be created with different parameters.
228+
**Note:** You can create any number of main methods through overloading features. i.e, Multiple main methods can be created with different parameters.
228229

229230
**[⬆ Back to Top](#table-of-contents)**
230231

@@ -333,7 +334,7 @@ Frequently asked Java Interview questions
333334
}
334335
```
335336

336-
Whereas the exceptions which are not checked at compile time are known as unchecked excpetions. All the exceptions under Error and RuntimeException comes under unchecked exceptions.
337+
Whereas the exceptions which are not checked at compile time are known as unchecked exceptions. All the exceptions under Error and RuntimeException comes under unchecked exceptions.
337338

338339
Some of the common unchecked exceptions are,
339340

@@ -376,7 +377,7 @@ Frequently asked Java Interview questions
376377
| boolean | Boolean |
377378
| char | Char |
378379
379-
You can use `.valueOf` methods from wrapper classes to convert primitive to object type, and the same way wrapper class methods like `intValue`, `doubeValue` etc used to convert wrapper class to primitive type. But this manual process can be automated.
380+
You can use `.valueOf` methods from wrapper classes to convert primitive to object type, and the same way wrapper class methods like `intValue`, `doubleValue` etc used to convert wrapper class to primitive type. But this manual process can be automated.
380381
381382
1. **autoboxing**
382383
@@ -585,7 +586,7 @@ Frequently asked Java Interview questions
585586
class T implements Comparable<T> {
586587
@Override
587588
public int compareTo(T t) {
588-
// comparasion logic goes here
589+
// comparison logic goes here
589590
}
590591
}
591592
```
@@ -638,6 +639,7 @@ Frequently asked Java Interview questions
638639
}
639640
}
640641
```
642+
641643
**Comparator:**
642644

643645
The comparator is a functional interface used to sort objects and it provides **multiple sorting sequence** in which objects sorted based on multiple data members. This interface is available as part of `java.util` package. For example, Employee object can be sorted based on multiple attributes like id, name, age etc.
@@ -650,7 +652,7 @@ Frequently asked Java Interview questions
650652
}
651653
```
652654

653-
You can create multiple separate classes (which implement Comparator interface) to compare by different members.The Comparator provides the compare() method which can be overriden to customize the comparison logic. For example, group of employees sorted based on id and age data members even though Employee class overridden the compareTo method.
655+
You can create multiple separate classes (which implement Comparator interface) to compare by different members.The Comparator provides the compare() method which can be overridden to customize the comparison logic. For example, group of employees sorted based on id and age data members even though Employee class overridden the compareTo method.
654656

655657
```java
656658
public static void sortById(List<Employee> employees) {
@@ -677,4 +679,8 @@ Frequently asked Java Interview questions
677679

678680
**[⬆ Back to Top](#table-of-contents)**
679681

682+
19. ### What Is an inner class
683+
684+
**[⬆ Back to Top](#table-of-contents)**
685+
680686
<!-- QUESTIONS_END -->

0 commit comments

Comments
 (0)