Java Quick Guide

 
 
This guide contains useful Java information.

rss feed






Java string type.



Information
A String is nothing more than an array of characters (char), for example:

public class DemoString {

   public static void main (String[] args) {
      char data[] = {'h','e','l','l','o'};
      String str = new String(data);
      System.out.println(str);
   }
}




You should see:

hello