B
BHARAT
Hi,
I am a amateur Jav programmer currenlty in learning phase.
I have a little problem.
I have made a package 'thing'
the code is for the package is :
package thing;
public class test
{
public static void print1()
{
System.out.println("BHARAT MEHTA I AM FUNCTION#1");
}
public static void print2()
{
System.out.println("BHARAT MEHTA I AM IN FUNCTION#2");
}
}
ANd I have made a .java file where i am importing that package:
import thing.*;
public class demo
{
public static void main(String [] args)
{
test.print1();
test.print2();
}
}
The code gives an error on compilation saying inaccessible class or
package not found.
I have also done the classpath setting for providing the location of
package to java compiler.
But its still not working.
PLease help???????????//
I am a amateur Jav programmer currenlty in learning phase.
I have a little problem.
I have made a package 'thing'
the code is for the package is :
package thing;
public class test
{
public static void print1()
{
System.out.println("BHARAT MEHTA I AM FUNCTION#1");
}
public static void print2()
{
System.out.println("BHARAT MEHTA I AM IN FUNCTION#2");
}
}
ANd I have made a .java file where i am importing that package:
import thing.*;
public class demo
{
public static void main(String [] args)
{
test.print1();
test.print2();
}
}
The code gives an error on compilation saying inaccessible class or
package not found.
I have also done the classpath setting for providing the location of
package to java compiler.
But its still not working.
PLease help???????????//