2017-04-11 65 views
-3

下面是我的代码,它是抛出编译时错误。难以让Jgrasp编译我的代码

import Java.util.Scanner; 
class gucci{ 
    public static void main(String args[]){ 
     Scanner ice = new Scanner(System.in); 

     int lost = 5; 
     int sauce = 18; 
     lost++; 
     System.out.println(lost); 
     Stytem.out.println(lost); 
    } 
} 

这里的代码有什么问题?

+0

这是 - >导入java.util.Scanner中与小写字母“J” –

+0

此外,你必须在最后的System.out.println一个错字 –

回答

-1

请找到正确的一个。比较代码有更好的理解:

import java.util.Scanner; // not the Java.util.Scanner 
    public class Gucci{ 
     public static void main(String args[]){ 
      Scanner ice = new Scanner(System.in); 
      int lost = 5; 
      int sauce = 18; 
      lost++; 
      System.out.println(lost); 
      System.out.println(lost); // not the Stytem.out.println(lost); 
     } 
    } 
-1
import Java.util.Scanner; 
    ^

应该

import java.util.Scanner; 

Stytem.out.println(lost); 
^^ 

应该

System.out.println(lost);