/* */ Click to Join Live Class with Shankar sir Call 9798158723

String in Java ?


A String is a sequence of characters, but it’s not a primitive type. We can create a string in java, it actually creates an object type String.String is immutable object which means that it cannot be changed once it is created.There exists a primitive data type char in Java which is used to declare character-type variables. It represents or stores a single character.


Q.) Example of Using String class in Java ?
    // student name
public class Main {

  public static void main(String args[]) {
    String stdName = "ShineSkill";
    System.out.println(stdName); // sufiyan
  }
}

Output
ShineSkill