OOPS Tutorial:
Object-oriented programming (OOP) is a computer science term used to characterize a programming language that began development in the 1960’s. The term ‘object-oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodology of using objects as the foundation for computation. By the 1980’s, OOP rose to prominence as the programming language of choice, exemplified by the success of C++. Currently, OOPs such as Java, J2EE, C++, C#, Visual Basic.NET, Python and JavaScript are popular OOP programming languages that any career-oriented Software Engineer or developer should be familiar with.
Java FAQ'S:
1.What is Java?
Java was originally developed as an implementation of a programming language that would compile and complete its directive functions regardless of platform and language version by James Gosling, a software developer employed by Sun Microsystems in June of 1991.
Gosling's main goals in developing the Java language were: implementing object oriented programming methodology containing built in support for the use of computer networks, the ability to execute remote sources of code in a secure fashion, and of course cross platform compatibility.
2.What is JNI?
JNI is the Java Native Interface.
JNI is an interface between Java and applications and libraries written in other languages.
As an example, JNI enables Java programs to use C libraries and also enables C programs to use Java classes.
JNI is distributed as part of the JDK.
3.What is the JDK?
The JDK is the Java Development Kit.
The JDK consists of the Java compiler and related tools which enable users to create applications in Java.
4.What is a Java compiler?
A Java compiler is a program which converts Java source code into Java bytecode.
A basic Java compiler is included as part of the JDK (Java Development Kit). This Java compiler is called "javac".
5.What is Java source code?
Java source code is code that you write in the Java programming language.
Java source code is converted to Java bytecode by the Java compiler.
Java source code files usually have the .java extension.
Sun recommends that Java source code files be no longer than two thouand lines. Larger source code files should be split up into multiple smaller files.
6.What is Java bytecode?
Java bytecode is produced by the Java compiler and executed by the JVM (Java Virtual Machine).
Java bytecode isn't exactly source code, and it isn't exactly compiled code, it's something in the middle.
Java bytecode is one of the things that make it possible for Java code to run on many different platforms.
7.What is a Java Virtual Machine?
A Java Virtual Machine is quite simply a piece of software that enables Java technology to be recognized and successfully executed on a vast array of hardware platforms. Java virtual machines are so named because they provide a necessary environment for the Java bytecode to be executed. The flexibility of a JVM allows a Java applet to be written only once, but able to be run on virtually any operating system.
8.What is a Java package?
A Java package is a set of classes which are grouped together.
This grouping helps to organize Java classes and codevent multiple Java classes with the same name.
9.What is the JRE?
The JRE is the Java Runtime Environment.
The JRE consists of the Java Virtual Machine, the Java libraries, and all other components necessary to run Java applications and applets.
10.What is a jar file?
A jar file is a Java Archive.
A jar file is a collection of class files.
The jar file standard is based upon PKZip. In fact, you can open .jar files with a normal unzip program!
A jar archive should contain a file called Manifest.mf which tells the Java Virtual Machine which class file contains the main method.
11.What is a Java servlet?A servlet is a Java program which is run on a web server.
A Java servlet is much like a Java applet, except that servlets are run on the web server instead of being downloaded to the web client.
12.What is a Java class?
A Java class is a group of Java methods and variables.
Each Java source code file can contain one public class. The name of this public class must match the name of the Java source code file. If the public class is called "ballistics", then the filename would be "ballistics.java".
13.What is a Java method?
A Java method is a set of Java statements which can be included inside a Java class.
Java methods are similar to functions or procedures in other programming languages.
Every Java program must have one main() method.
14.What is the main method?
Every Java program must have one main method. The main method is the first method which the Java Virtual Machine executes. The main method then calls the other methods, as they are needed.
Main method is often written as main() method.
It is good programming practice to maintain a very small main method and to move all possible code into other methods.
15.What is a static method?
A static method is a method which accepts arguments instead of using instance variables.
The opposite of a static method is an instance method.
The default for a method is to be an instance method. Methods must be explicitly defined as static methods.
A static method is also referred to as a class method.
16.What is a constructor?
A constructor is a special method for initializing a new instance of a class.
The constructor method for a class will have the same name as the class.
17.What are JavaBeans?
JavaBeans are reusable software components which can be used to develop larger applications.
No comments:
Post a Comment