What is difference between abstract class and interface
Class string{ public static void main(string args[]){ } }
What do you mean by static methods?
Static methods dont need class objects to call them where as nonstatic methods needs class objects to call them
Java does not supports recursion
A) trueb) false
Java supports recursion
false
All the classes including the abstract classes can have constructors.Abstract class constructors will be called when its concrete subclass will be instantiated.
Abstract class constructor can be called from the subclass that is extending this abstract class. You would define a constructor in an abstract class if you are in one of these situations: •you wa...
Yes, Abstract Class can have Constructor, infact I would say it SHOULD have constructor.As ABS class is not a class WITH NO FUNCTIONALITY, it always can HAVE some common functionality.Please understan...
The data, or variables, defined within a class are called _______ variables
A) objectb) classc) instance d) none of the above
Instance variables
The answer can also be instance variables as they are also defined inside a class althought they can belong to objects in particular.
An Interface force the end user to implement all the methods declared in the interface, in this way it is ensured that all the extending classes of a particular interface are ...
We declare methods in interfaces, by declaring these methods we provide signature of method to the class which implements this class.one interface can be implemented by any number of classes. By impl...
What are the advantage of servlet over JSP and what are advantage of JSP over Java?
The first step is to understand the difference between the two..1. JSP is mailny used for displaying data but servlet is used for providing the business logic2. JSP can support only HTTP protocol wher...
Advantages of Servlets over jsps:-(1)servlets are comparatively faster than jsps.Advantages of Jsps over servlets:-(1)Easy to write and maintain and comparatively developer friendly(2)Developer provid...
Rather creating mapping file try Annotations they are best and they take less time and they are efficient. You can reverse engineer them using net beans.
following things needed
1. put hibernate3.jar in project lib
2. write hibernate configuration file (ie) hibernate.cfg
3. write hibernate mapping file (say) student.hbm.xml
4. get hibernate session and begin transaction
5 end
bye
Explain abt try-catch-finally ?What is the exact use?
Try Catch are necessary for checked exceptions and you can use them for unchecked exceptions.Suspecious code is written in try and exception is handled in catch block and the finally block will execute every time weather exception is raised or not.
In java ... we often get free errors ... Somtimes ... the error might be in syntax those errors as know as Complication errors ... and the seconf type of errors is Runtime errors ...i.e.. the pr...
Here is the correct code for this. Save anywhere your document file it search and open. import java.io.*;public class Example { public static void main (String[] args) throws IOExcep...
I have used your source code
it opens the word software but it does not open the file
it is saying that permission is not there
pls provide some help on it
What is the use of system class?
Well it depends upon you for what purpose do use system class.Say, System.in >> belongs to inputstream interface helps in inputting from the console.whereas, System.out and System.err is used to...
System class is used to provide access to the system resources.
A class is a template for an object, and an object is an instance of a class.
A) trueb) false
Well said and its True that class is a template for an obejct(s) because all the objects are combined to form class as they all have similar features.
Cheers
true
A class is a template for multiple objects with similar features
What is meant by pre-emptive scheduling?
Fixed priority pre-emptive scheduling is a scheduling system commonly used in real-time systems. With fixed priority pre-emptive scheduling, the scheduler ensures that at any given time, the processor executes the highest priority task of all those tasks that are currently ready to execute.
Fixed priority pre-emptive scheduling is a scheduling system commonly used in real time systems With fixed priority pre-emptive scheduling, the scheduler ensures that at any given time, the processor executes the highest priority task of all those tasks that are currently ready to execute.
A) trueb) false
In this Question in the given example class-var is nothing but an object of class classname
no its not create a object
A) factorial of 3 is 3b) factorial of 3 is 6c) factorial of 3 is 9d) none of the above
Ans is (d) None of the above
Because we are not defining else part of the if statement.
Unreachable code error because of the absence of else part.
D)None of the above
Java Mail API is ued to send a Mail through java application. To Test Program all you need to have is a SMTP address (Which your ISP Provides). We will see a sample program to send a mail through j...
Explain Java classes in detail?
The Java class file is a precisely defined format for compiled Java. Java source code is compiled into class files that can be loaded and executed by any JVM. The class files may travel across a netwo...
How to convert .Class file to .Exe file
This is a very common question asked in the comp.lang.java newsgroup. Its often useful to have an executable application when deploying your applications to a specific platform, but remember to make your .class files available for users running Unix/Macintosh/other platforms.
Any concept you wish to implement in a Java program must be encapsulated within a class.
A) trueb) false
flase
True as u can only define methods n variables in interfaces but your implementation will always be in class.
polymorphism are mainly two types static polymorphism(corresponding method will bind at the time of compiling) dynamic polymorphism(corresponding method will bind at the run time) Static polymorphi...
In a very simple and high level, Interface is something to tell a guy, Hey X, you should to all these if you need me whereas abstract class tells Hey X, you should do this alone need not to disturb others.