2014-11-15 3 views
-3

이것은 어리 석을 수 있습니다. 하지만, 나는 오류가 나타납니다 : "오류 : ';' if (! Temp_List.isEmpty()) "아래의 코드를 빌드 할 때. 나는 그것을 이해할 수 없다. 아무도이 문제를 해결할 수 있도록 도울 수 있습니까?오류 : ';' 예상

미리 감사드립니다.

public class Error_Case 
{ 

    ArrayList<String> Temp_List=new ArrayList<String>(); 

    private class CHECK_CLASS 
    { 
     public void Check() 
     { 
      If(!Temp_List.isEmpty()) 
      { 
       System.out.println("Temp_List is not empty !"); 
      } 
     } 
    } 

    public void run() 
    { 
     CHECK_CLASS new_Class=new CHECK_CLASS(); 
     new_Class.Check(); 
    } 

    public static void main (String[] args) 
    { 
     Error_Case controller=new Error_Case(); 
     controller.run(); 
    } 
} 
+0

if ... –

+2

if if not if If. 구문 오류는 여기에 있습니다. 미래를 염두에 두십시오. –

+1

프로그래밍 편집기 사용을 고려하면 대부분의 현대 편집자는 구문 오류 (예 :이 경우)를 표시합니다. – aggaton

답변

2

모든 Java 키워드는 소문자입니다. 따라서, Ifif해야한다 :

if (!Temp_List.isEmpty()) 
{ 
    System.out.println("Temp_List is not empty !"); 
} 
+0

대단히 감사합니다! –

0

자바 프로그래밍 언어는 케이스 Sensitive.you이 같은 If를 작성 해달라고입니다. 소문자 if처럼 쓰십시오. 소문자로해야 당신의 code.It에 만약 경우

 if(!Temp_List.isEmpty()) 
     { 
      System.out.println("Temp_List is not empty !"); 
     } 
+0

대단히 감사합니다! –

0

당신은 선언했다.

public void Check() 
     { 
      if(!Temp_List.isEmpty()) 
      { 
       System.out.println("Temp_List is not empty !"); 
      } 
     } 
+0

대단히 감사합니다! –