87.7k views
1 vote
Assume that the main method of the class named Welcome does not contain any compile-time errors. What is the name of the file generated by the Java compiler?

1 Answer

6 votes

Answer:

Welcome.class is the file generated by the Java compiler.

Step-by-step explanation:

When we compile welcome.java by javac command it converted into .class file i.e it convert into Welcome.class if it does not contain any compile-time errors. This file containing Java bytecode that can be executed on the Java Virtual Machine(JVM).

class Welcome

{

public static void main(String args[])

{

System.out.println(" hello");

}

}

Save:Welcome.java

compile it by javac command

javac Welcome .java

it will converted into :Welcome.class.

User PeYoTlL
by
6.2k points