Hi Daniweb team,
I need to understand newinstance in java.I do no how to implement it and i tried this program but getting some errors.
1.Can anyone tell me how to use new Instance and what mistakes i have made in this program.?
import java.io.*;
public class sample
{
public static void main(String args[])throws IOException{
one obj=one.newinstance();
obj.one();
}
}
class one{
public static void one(){
System.out.println("Sample program for new instances");
}
}
Thank you in advance,
Prem