Hi,
In C program Function has three parts,
Function Declaration.
Function Definition.
Function Calling.
In java i cannot able to declare a function .Is it possible to declare a function in Java.
For example:
import java.io.*;
import java.util.*;
class Fun_example
{
// show();//Cannot able to Declare a Function ?
public void show(){ //Function Definition
System.out.println("Sample Method ");
}
public static void main(String args[])throws IOException{
ex_constructor obj1,obj2;
obj1=new ex_constructor();
obj1.show();//Function Calling
}
}
Thank you,
With Regards,
Prem