What is printed out when the program is excuted?

Given:
<code>
public class MainMethod {
void main() {
System.out.println(“one”);
}
static void main(String args) {
System.out.println(“two”);
}
public static void main(String[] args) {
System.out.println(“three”);
}
void mina(Object[] args) {
System.out.println(“four”);
}
</code>
What is printed out when the program is excuted?

Given:

public class MainMethod {
void main() {
System.out.println("one");
}
static void main(String args) {
System.out.println("two");
}
public static void main(String[] args) {
System.out.println("three");
}
void mina(Object[] args) {
System.out.println("four");
}

What is printed out when the program is excuted?

A.
one

B.
two

C.
three

D.
four



Leave a Reply 1

Your email address will not be published. Required fields are marked *


sully

sully

is three printed out because public static void main is just before it.