:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Java Related >> Java J2EE >> Core Java


 Core Java interview questions  Core Java Interview Questions (1721)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (146)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
can we write program without class
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
# 1
2 ans for this question. a class class name and the constructor is must. so we cant write a file without class.(for this reason only the compiler adds a default constructor)

2.dont write anything inside a text doc(Empty text doc) and save this file as it is possible to compile this file but it doesnot produce any .class file.
Is This Answer Correct ?    13 Yes 6 No
Ashok Reddy
# 2
no we cant write any program without class.because its
purely object oriented.
Is This Answer Correct ?    6 Yes 1 No
Jain Mayur
# 3
class with out name is called ananamous class. 
Is This Answer Correct ?    5 Yes 4 No
# 4
no.becoz java is pure object oriented all the
member functions and datamembers must be write inside the we can also say that class is an example for
encapsulation.encapsulation is binding data and member
functions in a single unit.
Is This Answer Correct ?    2 Yes 2 No
Bhargavi Rani
# 5
without creating class we will not wtite a program. 
Is This Answer Correct ?    2 Yes 2 No
# 6
no,because java is purely object oriented language,so we can't create the objects with out writing a class.And also we can save the code as that's the reason also we must create a class 
Is This Answer Correct ?    3 Yes 4 No

Other Core Java Interview Questions
  Question Asked @ Answers
What is the format of Inner Class after it compiled?   1
what is the diff between Servletcontext and servletconfig?   5
Can multiple catch statements be used in exceptions ? Wipro 6
How the elements are organized in CardLayout?   5
where is .equals() method and how is it different from == operation <giving some confusing implementation> Is hashing related to these? iFlex 4
Difference between prefix and postfix forms of the ++operator?   3
How core java/j2ee project performance can be measured ?   1
What is light weight component?   3
how can we use the servlet as standalone apllication?should we need to extend any class? Logica-CMG 2
perpare on factorypattern,linklist wothout using collection, (multitharding ie create producer/customer therad producer create Queue continuesly,consumer consume queue, consumer wait if queue is full,producer wait if queue is empty),diff betn sleep(1000)&wait(1000) these r the main Q ask in huawei(2008) Huawei 1
What is thread? BMC 6
How is rounding performed under integer division? Satyam 2
For more Core Java Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::