Hi ALL,
Here I wrote a program for Void Method in java.
/**
*
* @author Balamurgan
M
*/
public class voidMethod {
public static void
main(String arg[]){
System.out.println(" Return void method ");
System.out.println(" Test void method
"+nprintln("welcome to java",5));
}
public static void
nprintln(String msg,int n){
for(int
i=0;i<n;i++)
System.out.println("meassage : "+msg +" value "+n);
}
}
No comments:
Post a Comment