can we write a program with out a class in core java?

Answer Posted / saran

it is possible to create java program without userdefined class.

public enum AAA {

AAA;

public static void main(final String[] args) {
System.out.println("H");
}

}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are parameters used in functions?

534


Is string a datatype?

556


What are the two types of java programming?

540


What is the difference between final, finally and finalize() in java?

522


Can I declare a class as private?

600






What is a control variable example?

534


Explain the difference between collection api and stream api in java8?

513


Why set do not allow duplicates in java?

584


Difference between collection, collection and collections in java?

571


What are the pillars of java?

491


How do you stop a thread in java?

600


What is enhanced loop in java?

553


What is the loop in java?

578


Which collection is best for sorting in java?

699


what do you mean by marker interface in java?

547