Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Use of getclass()in string

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());
}
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #Use #string
ADD COMMENT
Topic
Name
8+5 =