import java.util.*;
import java.lang.*;
public class String{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
System.out.println("Enter a String: ");
String s=in.nextLine();
}
}
Here's my code. Whenever i compile this java code i get an error as:
Incompatible types:java.util.String cannot be converted to String
String s=in.nextLine();
^
can any one tell me what should i do to get over it.
String.