Answers for "is string a primitive data type/use of getclass()"

-1

is string a primitive data type/use of getclass()

import java.util.Scanner;

public class StringExample {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter a sting value:");

String str = sc.nextLine();
System.out.println(str.getClass());
}
}
Posted by: Guest on May-14-2021

Code answers related to "is string a primitive data type/use of getclass()"

Browse Popular Code Answers by Language