HI everyone,i am a biginer in java and i need your help...i have write a prgram but i cant execute can anyone help me for execute it
the program is :
package sensor;
public class sensor {
private String Id;
private int Kordx;
private int Kordy;
private char[] getId;
public static void main(String[] args) {
sensor ob=new sensor ("first","1","1");
System.out.println(ob.getId);
System.out.println(ob.getKordx() + ob.getKordy());
ob.setKordx("2");
ob.setKordy("2");
ob.setId("second");
System.out.println(ob.getId);
System.out.println(ob.getKordx() + ob.getKordy());
}
public sensor (String id,int kordx,int kordy)
{
Id=id;
Kordx=kordx;
Kordy=kordy;
}
public String getId()
{
return Id;
}
public void setId (String id )
{
Id=id;
}
public int getKordx()
{
return Kordx;
}
public void setKordx (int kordx )
{
Kordx=kordx;
}
public int getKordy()
{
return Kordy;
}
public void setKordy (int kordy )
{
Kordy=kordy;
}
}
i think the problem is in sensor ob=new sensor ("first","1","1"); but i dont know why,please help me!
REGARDS DHIJA22