Can somebody please help me or tell me how to write functions in java.

Recommended Answers

All 2 Replies

Another name for function in Java is a method. in other words a Method is like a Function.

have you written a simple program in java ??? if yes ... then public static void main (String [] args) is a function ... in java a function is called a method ... you can write a method like this :

public void methodName(in a, double b){
}

where void is the return type and a and b are the passing parameters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.