Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / shree

no..

Is This Answer Correct ?    22 Yes 5 No

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

Answer / venkat kanneganti

yes,an empty source file is compiled with out error,but it
will throw Runtime Exception when jvm will not find Main()
method.

Is This Answer Correct ?    18 Yes 2 No

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

Answer / navneet raushan

Yes, with the help of static block we can write a program.
static block executed first always

Is This Answer Correct ?    12 Yes 5 No

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

Answer / karthik

yes we can write using interface

Is This Answer Correct ?    5 Yes 2 No

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

Answer / 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

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

Answer / pushpendra

no

Is This Answer Correct ?    6 Yes 4 No

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

Answer / juned

yes,It is possible by using enum(which is a predefine class)

Is This Answer Correct ?    2 Yes 0 No

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

Answer / akshara

yes,by using static keyword

Is This Answer Correct ?    1 Yes 0 No

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

Answer / 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

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

Answer / yogesh

no...

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

Can the garbage collection be forced by any means?

0 Answers  


How many types of variables are there?

0 Answers  


What is wrapper class example?

0 Answers  


Can a class have 2 constructors?

0 Answers  


ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }

1 Answers  


how its run?

0 Answers  


What do you understand by classes in java?

0 Answers  


Explain the difference between association, aggregation and inheritance relationships.

0 Answers  


Explain java heap space and garbage collection?

0 Answers  


What is OOP?

2 Answers   BMC, Microsoft,


Explain 5 features introduced in jdk 1.7?

0 Answers  


How do you find the independent variable?

0 Answers  


Categories