class Test1 {
static void mountain()
{
System.out.println("Monadnock");
}
static Test1 favorite()
{
System.out.print("Mount ");
return null;
}
public static void main(String[] args)
{
favorite().mountain();
}
}
What is the output of this program?
static void mountain()
{
System.out.println("Monadnock");
}
static Test1 favorite()
{
System.out.print("Mount ");
return null;
}
public static void main(String[] args)
{
favorite().mountain();
}
}
References
- [1] The Java Language Specification, Java SE 8 Edition
- https://docs.oracle.com/javase/specs/
No comments:
Post a Comment