Hi daniweb team,
I need to understand newinstance in java.So i tried the below program and got the error.
Can any one know how to write the newinstance program and explain the code.
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,
Prem