This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Monday, August 26, 2019

My Location


Friday, August 23, 2019

Strings in Java

String represents group of characters.

In C, C++ languages, a String represents an array of characters, where the last character being '\0' represents the end of the string. But this is not valid in Java, a string is an object of String class.  It is not a character array.  In java, we got character array also, but strings are given a different treatment because of their extensive use on internet.  JavaSoft people have created a class separately with the name 'String' in java.lang(language) package with all necessary methods to work with strings.

Even though, String is a class, it is used often in the form of a data type
eg: String s="java";

Is String is class or datatype?

String is a class in java.lang package.   But in java, all classes are also considered as data types.  So we can take String as a data type also.

Can we call a class as datatype?

Yes, a class is also called 'user-defined' data type.  This is because a user can create a class.

Thursday, August 22, 2019

Uses of Threads

  1. Threads are mainly used in server-side programs to serve the needs of multiple clients on a network or Internet. On Internet, a server machine has to cater the needs of thousands of clients, at a time. If we use threads in the server, they can do various jobs at a time, thus they can handle several clients.
  2. Threads are also used to create games and animation. Animation means moving the objects from one place to another. In many games, generally we have to perform more than one task simultaneously.
  3. Threads are light-weight because they utilize minimum resources of the system. This means they take less memory and less processor time.