View RSS Feed

Recent Blogs Posts

  1. Creating Strings

    by , 04-26-2012 at 07:25 PM
    Another direct method for creation of string is, to write:
    Java Code:
    String greeting = "Hello world!";
    In your code, whenever string literal is encountered, a String object is created by the compiler along with value, “Hello World”
    Eleven constructors are present in String class which permits to give the string’s initial value by usage of different kind of resources, like character array.
    Java Code:
    public class StringDemo{
       public static void main(String