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

Answer Posted / subrat

ya we can do it by using enum,but it is also a predefined class.

public subrat
{
subrat;
public static void main(String k[])
{
System.out.println("SUBRAT");
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is used of static keyword in java?

593


What is the difference between object oriented programming language and object based programming language?

560


Differences between C and Java?

620


What does opcode mean?

543


Differentiate between == and equals().

602






How do you add an element to a set in java?

500


How to find the given number is a prime number or not by getting input from the user

557


What does void * mean?

537


What is <> used for in java?

674


What is a key in java?

505


What is private static class in java?

518


What's the purpose of using break in each case of switch statement?

514


How do you invoke a method?

542


Is it safe to install java on my computer?

545


What are the principle concepts of oops?

540