Quantcast
Channel: Program Creek » Basics
Browsing latest articles
Browse All 6 View Live

Java Serialization

What is Serialization? In Java, object serialization means representing an object as a sequence of bytes. The bytes includes the object's data and information. A serialized object can be written into a...

View Article



Compile and Run Java in Command Line with External Jars

The following example shows how to compile and run Java program in command line mode with external jars. It is developed under Linux. 1. Compile & Run Java Program Without External Jar Let's create...

View Article

Create Java String Using ”” or Constructor?

In Java, a string can be created by using two methods: String x = "abc"; String y = new String("abc"); What is the difference between using double quotes and using constructor? 1. Double Quotes vs....

View Article

How Developers Sort in Java?

While analyzing source code of a large number of open source Java projects, I found Java developers frequently sort in two ways. One is using the sort() method of Collections or Arrays, and the other...

View Article

Java Remove Element from ArrayList

To remove some elements from an ArrayList while iterating over the ArrayList, we need to use Iterator. Integer[] arr = {1,2,3,4,5,6}; ArrayList<Integer> list = new...

View Article


Compile and run Eclipse Java projects from Linux terminal

If you are developing a Java project in Eclipse under a linux system, you may want to remote access the project from another location. You can remote desktop the linux box by using teamviewer, but...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images