Computer Applications
What is the role of void keyword in declaring functions ?
User Defined Methods
3 Likes
Answer
The keyword 'void' signifies that the method doesn't return a value to the calling method.
Answered By
1 Like
Related Questions
A static class method can be invoked by simply using the name of the method alone. (True/False)
Which of the following function-definitions are overloading the method given below :
int sum(int x, int y) {}
- int sum(int x, int y, int z) { }
- float sum(int x, int y) { }
- int sum (float x, float y) { }
- int sum (int a, int b) { }
- float sum(int x, int y, float z) { }
How is call-by-value way of function invoking different from call-by-reference way ? Give appropriate examples supporting your answer.
What is the output of the following program ? Justify your answer.
class Check { public static void chg (String (nm) ) { nm = "Aamna" ; // copy "Aamna" to nm } public void test( ) { String name= "Julius"; System.out.println (name); chg(name); System.out.println(name); } }