Object is an instance of a class.It has state,behaviour and identity.There are no types of objects.For the object to be created,the class of the object should be created with needed constructors and then creation of object is done by : Classname objectname = new classname()(depends on which constructor we use).
Java s biggest advantage is portability of code and its power lies in its APIs.It offers support to various types of applications and is a pure Object oriented language,while C++ is not.It is not Platform independent,but performance wise it is better than Java.
There cannot be private constructors as they are of no use.Constructors are invoked while creating objects,if the construct is private,you cannot create objects of the class from outside and hence there cannot be private constructors.
Javascript is processed mostly by the browser(client side),while PHP is the server side language used to handle dynamic pages.
Wait waits till the other process is completed or a revoke(not sure about the method's name) is called,while sleep sleeps for the specified amount of period.
The Java Interpretar converts the source java code to byte code which is understandable by the JIT(Just Int Time) compiler.Now,The JIT compiler converts the byte code to native code.This is how portability is achieved in Java.
Here are the steps :
* Open the command prompt
* Set Path as 'C:\Program FilesJavabin"
*use the command -> java here filename is the absolute path of the Java file you want to compile
*then to run use javac
Encapsulation is hiding of implementation details.Let me tell you an example for your second question : Consider a house without walls,Is it safe - No,it isn't.For safety and protection,we built walls on both sides(encapsulation is there).But,now the house is surrounded by only walls,what is the use?? So,you keep a door,thus making the house usable(Abstraction+Encapsulation).Abstraction is … Read more
Interface provides for flexibility and tends to resolve issues on vendor specific details by giving them the functions to implement.
Yes,it is a called so,because everything you use in Java should be used only in classes and their cannot be isolated functions.So,it is a pure Object Oriented Language.
Interfaces is one of the best used concepts in Java.let me explain this with an example : Say you designed a gps device for car which looks into the map and automatically turns the car to the direction as seen in the map.This GPS device can be used in many cars like benz,fiat,etc.For each car,the … Read more
Encapsulation is hiding the implementation details.For eg: You drive the car using the steering,geer and the implementation(engine,etc) is hidden from you and you need not know those details.This is Encapsulation.
Preprocessor is the phase which comes before compiling(Pre-before).This phase takes care of macro substitution,etc.Inline function is the expansion of function calls there itself by the compiler to prevent function overhead for small functions(by using the keyword inline(c++) the function is made inline).However,the compiler decides whether the functions is expanded or not based on certain conditions … Read more
Did you mean you have to add your picture in the HTML file.If so,you got to use image tag to include images in the file.image tag will take n attributes like your image's location,width,height,etc.
Close closes the particular part of the program,if it is used on the main form or window,it closes the entire application,while exit shutdowns the application as a whole.