Q:

Java - Method Concept

0

This Program is used to demonstrate Method concept.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

public class ssvprg 
{ 
public static void action(int value) 
{ 
System.out.println("Int = " + Integer.toString(value)); 
} 

public static void action(String value) 
{ 
System.out.println("Length = " + value.length()); 
} 

public static void main(String[] args) 
{ 
// Call with Integer argument. 
action(1);


// Call with String argument. 
action("cat"); 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now