DAY 2
- Choose the correct output among the following options.
- Actual and formal argument lists differ in length, compile time error.
- Syntax error
- [1,2,3,4,5]
- 1-2-3-4-5@e234545
- Choose the correct output among the following options.
import static java.util.Arrays.toString;
class Main{
public static void main(String[] args) {
printArgs(1,2,3,4,5);
}
static void printArgs(Object... args){
System.out.println(toString(args));
}
}
/**
* Generated by DC Sharma.
* from E:TestRoot\apps\units\include\Alpha.dll
* Date: April 27, 2023
*/
class T{
public static void main(String[] args) {
System.out.print("Hell");
System.out.println("o class");
}
}
Comments
Post a Comment