☕️JAVA Language Community
2.91K subscribers
144 photos
7 videos
31 files
42 links
☕️ Software, IT, Java, news
💻 IT highlights
🎯 AI update
🖥⌨️🖱
Download Telegram
#Java_Interview_Question

128) What is Deserialization?

Deserialization is the process of reconstructing the object from the serialized state.It is the reverse operation of serialization.

@javaCode☕️
#Java_Interview_Question

129) What is transient keyword?

If you define any data member as transient,it will not be serialized.

👉more details

▪️Java Transient Keyword

Java transient keyword is used in serialization. If you define any data member as transient, it will not be serialized.

Let's take an example, I have declared a class as Student, it has three data members id, name and age. If you serialize the object, all the values will be serialized but I don't want to serialize one value, e.g. age then we can declare the age data member as transient.

@javaCode☕️
#Java_Interview_Question

130)What is Externalizable?

Externalizable interface is used to write the state of an object into a byte stream in compressed format.It is not a marker interface.

@javaCode☕️
#Java_Interview_Question

131)What is the difference between Serializalble and Externalizable interface?

Serializable is a marker interface but Externalizable is not a marker interface.When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject() two methods to control more complex object serailization process. When you use Externalizable interface, you have a complete control over your class's serialization process.

@javaCode☕️
#Java_Interview_Question

132)How do I convert a numeric IP address like 192.18.97.39 into a hostname like java.sun.com?

By InetAddress.getByName("192.18.97.39").getHostName() where 192.18.97.39 is the IP address.

@javaCode☕️
#Java_Interview_Question

133) What is reflection?

Reflection is the process of examining or modifying the runtime behaviour of a class at runtime.It is used in:

IDE (Integreted Development Environment) e.g. Eclipse, MyEclipse, NetBeans.
Debugger
Test Tools etc.

@javaCode☕️
#Java_Interview_Question

134) Can you access the private method from outside the class?

Yes, by changing the runtime behaviour of a class if the class is not secured.

@javaCode☕️
#Java_Interview_Question

👉Java Networking Terminology

The widely used java networking terminologies are given below:

1️⃣IP Address

2️⃣Protocol

3️⃣Port Number

4️⃣MAC Address

5️⃣Connection-oriented and connection-less protocol

7️⃣Socket

@javaCode☕️
#Java_Interview_Question

135) What is the difference between ArrayList and Vector?

1️⃣ArrayList is not synchronized.
Vector is synchronized.

2️⃣ArrayList is not a legacy class.
Vector is a legacy class.

3️⃣ArrayList increases its size by 50% of the array size.
Vector increases its size by doubling the array size.

@javaCode☕️
#Java_Interview_Question

136) What is the difference between ArrayList and LinkedList?

1️⃣ArrayList uses a dynamic array. LinkedList uses doubly linked list.

2️⃣ArrayList is not efficient for manipulation because a lot of shifting is required. LinkedList is efficient for manipulation.

3️⃣ArrayList is better to store and fetch data. LinkedList is better to manipulate data.

@javaCode☕️