가능한 중복은 :
What is the reason behind “non-static method cannot be referenced from a static context”?비 정적 방법은
import java.io.*;
public class Pay
{
boolean checkCard(int cardNumber)
{
boolean flag=false;
if(cardNumber==12)
return flag;
}
public static void main(String args[])throws SQLException
{
boolean f=checkCard(12);
System.out.println("\n Card Details "+f);
}
}
오전 오류 비 정적 메소드 체크 카드를 말하는 MSG (INT, 문자열, String)를 얻는 것은 할 수 없습니다 정적 컨텍스트에서 참조해야합니다.
Pls help me out
[ "인스턴스 및 클래스 멤버 이해"] (http://docs.oracle.com/ javase/tutorial/java/javaOO/classvars.html) – Sujay
이것에 관해서는 이미 수백 가지의 질문이 없기 때문에 ... –