19 October 2010
0 What is Methods in Java?
Methods in Java
Methods in Java is nothing but functions (As in C) the syntax of writing methods in Java is similar to that of functions in C.
Unlike C, all methods in Java should be written inside a class.
Unlike C, there is no default return type for a Java method.
In C language, a function whose return type is not specified is assumed to return an int. In Java there is no default return type for a method. Specifying the return type of a method is mandatory in Java.
Subscribe to:
Post Comments (Atom)
0 comments:
Please give your valuable comments.