Skip to content

Commit d3b9016

Browse files
committed
Fix image url
2 parents ce61e3e + af79fae commit d3b9016

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

+20-19
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ Frequently asked Java Interview questions
1010
| 2 | [Why Java is platform-independent language](#why-java-is-platform-independent-language) |
1111
| 3 | [How does JVM works](#how-does-jvm-works) |
1212
| 4 | [What are the main features of Java](#what-are-the-main-features-of-java) |
13-
| 5 | [What is string constant pool](#what-is-string-constant-pool) |
14-
| 6 | [Why strings are immutable](#why-strings-are-immutable) |
15-
| 7 | [What is the difference between StringBuffer and StringBuilder](#what-is-the-difference-between-stringbuffer-and-stringbuilder) |
16-
| 8 | [What is the importance of hashCode() and equals() methods](#what-is-the-importance-of-hashcode-and-equals-methods) |
17-
| 9 | [What is the difference between checked and unchecked expceptions](#what-is-the-difference-between-checked-and-unchecked-expceptions) |
18-
| 10 | [What are wrapper classes](#what-are-wrapper-classes) |
19-
| 11 | [What is the difference between abstract class and interface](#what-is-the-difference-between-abstract-class-and-interface) |
20-
| 12 | [What are marker interfaces](#what-are-marker-interfaces) |
21-
| 13 | [What are collections in Java?](#what-are-collections-in-java) |
22-
| 14 | [What are the differences between arraylist and vector?](#what-are-the-differences-between-arraylist-and-vector) |
13+
| 5 | [What is public static void main?](#what-is-public-static-void-main) |
14+
| 6 | [What is string constant pool](#what-is-string-constant-pool) |
15+
| 7 | [Why strings are immutable](#why-strings-are-immutable) |
16+
| 8 | [What is the difference between StringBuffer and StringBuilder](#what-is-the-difference-between-stringbuffer-and-stringbuilder) |
17+
| 9 | [What is the importance of hashCode() and equals() methods](#what-is-the-importance-of-hashcode-and-equals-methods) |
18+
| 10 | [What is the difference between checked and unchecked expceptions](#what-is-the-difference-between-checked-and-unchecked-expceptions) |
19+
| 11 | [What are wrapper classes](#what-are-wrapper-classes) |
20+
| 12 | [What is the difference between abstract class and interface](#what-is-the-difference-between-abstract-class-and-interface) |
21+
| 13 | [What are marker interfaces](#what-are-marker-interfaces) |
22+
| 14 | [What are collections in Java?](#what-are-collections-in-java) |
23+
| 15 | [What are the differences between arraylist and vector?](#what-are-the-differences-between-arraylist-and-vector) |
2324
<!-- TOC_END -->
2425

2526
<!-- QUESTIONS_START -->
@@ -206,13 +207,13 @@ Frequently asked Java Interview questions
206207

207208
**[⬆ Back to Top](#table-of-contents)**
208209

209-
6. ### Why strings are immutable
210+
7. ### Why strings are immutable
210211

211212
Strings are immutable, that means the contents of string objects can't be modified after their creation. i.e, When you try to alter the string, it creates a new string. Due to this behavior, the internal state of a string remains the same throughout the execution of the program. This characteristic of immutability helps with the benefits of caching, security, synchronization, and performance.
212213

213214
**[⬆ Back to Top](#table-of-contents)**
214215

215-
7. ### What is the difference between StringBuffer and StringBuilder
216+
8. ### What is the difference between StringBuffer and StringBuilder
216217

217218
String is an immutable class to represent sequence of characters. Java also provided mutable version of String class through StringBuffer and StringBuilder. Even though both these classes are mutable, there are many differences between StringBuffer and StringBuilder.
218219

@@ -226,7 +227,7 @@ Frequently asked Java Interview questions
226227

227228
**[⬆ Back to Top](#table-of-contents)**
228229

229-
8. ### What is the importance of hashCode() and equals() methods
230+
9. ### What is the importance of hashCode() and equals() methods
230231

231232
Since both `equals()` and `hashCode()` methods are available in Object class(i.e, Java.lang.object), every java class gets the default implementation of equals and hashCode methods. These methods work together to verify if two objects have the same value or not.
232233

@@ -258,7 +259,7 @@ Frequently asked Java Interview questions
258259

259260
**[⬆ Back to Top](#table-of-contents)**
260261

261-
9. ### What is the difference between checked and unchecked expceptions
262+
10. ### What is the difference between checked and unchecked expceptions
262263

263264
An exception is an event that interrupts the normal flow the program execution. There are two types of exceptions,
264265
1. Checked exceptions
@@ -329,7 +330,7 @@ Frequently asked Java Interview questions
329330
330331
**[⬆ Back to Top](#table-of-contents)**
331332
332-
10. ### What are wrapper classes
333+
11. ### What are wrapper classes
333334
334335
Wrapper classes provides the mechanism to convert primitive types into object types and vice versa. Since Java is an object-oriented programming language, and many APIs and libraries in Java require objects instead primitive types. For example, data structures in collection framework, utility classes from `java.utils.*`,cloning process, Serialization, Synchronization etc require object type.
335336
@@ -383,7 +384,7 @@ Frequently asked Java Interview questions
383384
384385
**[⬆ Back to Top](#table-of-contents)**
385386
386-
11. ### What is the difference between abstract class and interface
387+
12. ### What is the difference between abstract class and interface
387388
388389
Both Abstract class and interface are used to define contracts in object-oriented programming. But there are some key differences between them as shown below,
389390
@@ -399,7 +400,7 @@ Frequently asked Java Interview questions
399400

400401
**[⬆ Back to Top](#table-of-contents)**
401402

402-
12. ### What are marker interfaces
403+
13. ### What are marker interfaces
403404

404405
Marker interfaces are interfaces that don't have any fields, methods, or constants inside of it. They are also known as empty interfaces or tag interfaces. Examples of marker interface are Serializable, Cloneable and Remote interface. The purpose of marker interfaces are to provide run-time type information about an object to JVM and Compiler. They are mainly used in API development and in frameworks like Spring to provide additional information to the class.
405406

@@ -455,7 +456,7 @@ Frequently asked Java Interview questions
455456

456457
**[⬆ Back to Top](#table-of-contents)**
457458

458-
13. ### What are collections in Java?
459+
14. ### What are collections in Java?
459460

460461
Collections in Java is a unified framework that provides architecture for storing and manipulating a group of objects.
461462

@@ -465,7 +466,7 @@ Frequently asked Java Interview questions
465466

466467
**[⬆ Back to Top](#table-of-contents)**
467468

468-
14. ### What are the differences between arraylist and vector?
469+
15. ### What are the differences between arraylist and vector?
469470

470471
Both Vector and ArrayList use dynamically resizable array as their internal data structure and implement the List interface. But there are couple of differences between them as listed below,
471472

0 commit comments

Comments
 (0)