Java Tutorial

by Dinesh Thakur Category: Introduction to Java

Polymorphism is a very powerful concept that allows you to design amazingly flexible applications. The word 'Polymorphism: is derived form two Greek words 'poly' which means many and 'morphos' which means forms. So, polymorphism means the ability to take many forms.

 
by Dinesh Thakur Category: Introduction to Java

Definition: Encapsulation and data hiding are the key features of object oriented programming. Encapsulation refers to the ability to package related behavior in an object bundle and control or restrict their access in both function and data from other objects. It necessarily is all about packaging related stuff together and keeping them away from external elements. You will note that keywords encapsulation along with data hiding is used interchangeably all over.

 
by Dinesh Thakur Category: Introduction to Java

Initializing a variable is considered very helpful while making programs. We can initialize variables of primitive types at the time of their declarations. For example:

int a =10;

In Object Oriented Programming language (OOPL) like Java, the need of initialization of fields of a new object is even more common. We have already done this using two approaches.

 
by Dinesh Thakur Category: Introduction to Java

Java is the object-oriented programming language, similar to C++ high-level programming language and architecture neutral developed by Sun Microsystems in 1995 and later acquired by Oracle Corporation. Java was originally called OAK. Java is a computing platform for application development. Object-Oriented meaning the capability to reuse code. Secondly, it is platform independent, i.e., we don't have to develop separate applications for different platforms. It is possible to develop a single application which can run on multiple platforms like Windows, UNIX, and Macintosh systems. Java designed for hand-held devices and set-top boxes.

 
by Dinesh Thakur Category: Introduction to Java

The Java Compiler (Javac) is a command line tool that reads java source code files and compiles them into executable Java bytecode classes. The Java source code must be contained in files whose file names end with .java extension.



 
by Dinesh Thakur Category: Introduction to Java

Enumeration (enum) was not originally available in Java though it was available in other language like C and C++ but eventually Java realized and added to version 5 of Java were the safe type enumerations (Type Safe Enums), which allows you to create enums in Java, just as they exist in other technologies. It is defined by the reserved word enum, and each item in the enumeration is represented by an object of the same type as the Enum. The definition of an enumeration is no more than the definition of a special kind of class. If they were in another package, they should be imported like any other normal classes.

 
by Dinesh Thakur Category: Java Evolution

The JAR file (Java ARchive) is a way to compress multiple files in Java, as well as a ZIP. Usually the classes and other configuration files are stored.
As they grouped several classes in a single file, they are great for distributing libraries, such as database drivers, frameworks, systems modules, etc.



 
by Dinesh Thakur Category: Java Evolution

(Open Database Connectivity) An APPLICATION PROGRAMMING INTERFACE published by Microsoft which, by loading the appropriate ODBC driver at run time, enables the same program code to have access to data from many different brands of database.



 
by Dinesh Thakur Category: Java Evolution

Java Virtual Machine (JVM)

JVM is a set of computer software programs and data structures which implements a specific Virtual machine model.



 
by Dinesh Thakur Category: Java Evolution

The means that allows Java to solve both the security and the portability problems is that the output of a Java compiler is not executable code but it is the Bytecode. Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the lava Virtual Machine (JVM). JVM is an interpreter for bytecode. The fact that a Java program is executed by JVM helps solve the major problems associated with downloading programs over the Internet. Translating a Java program into bytecode helps makes it much easier to run a program in a wide variety of environments. This is because only the JVM needs to be implemented for each platform.

 
by Dinesh Thakur Category: Java Evolution

All the Previous Languages are Structured or we can say that they were procedural programming means in them processing is to be done in sequence manner and These are also called the Top down or either they were bottom up Languages Most Important things those must be in the Languages are Reliability, Maintainability and Reusability and user Friendly So For Achieving these things they Developed java.



 
by Dinesh Thakur Category: Java Evolution

1) Compiled and Interpreter: has both Compiled and Interpreter Feature Program of java is First Compiled and Then it is must to Interpret it .First of all The Program of java is Compiled then after Compilation it creates Bytes Codes rather than Machine Language.



 
by Dinesh Thakur Category: Java Evolution

Language: C is a powerful, efficient, general purpose structured programming language. Although C is a high level language but it also supports features of a low level language, so it is sometimes called a middle level language. It is actually binding the gap between a machine language and more conventional high level languages. c++ is partial copy of object oriented programming language that allow programmers to build large and complex applications in a useful and efficient way.

 
by Dinesh Thakur Category: Java Evolution

C++ and Java both are Object Oriented Languages but some of the features of both languages are different from each other. Some of these features are :

 
by Dinesh Thakur Category: Java Evolution

What is JVM (Java Virtual Machine): Most programming languages such as C/C++ compile source code directly into machine code suitable for execution on a particular microprocessor architecture or operating systems such as Windows or Unix. This property does not make these languages' architecturally neutral'. However, Java is an architectural neutral language as it follows. Write once execute anywhere approach. This feature of Java achieved as the Java compiler does not translate the source code into the machine language of the computer that the program is running on. Instead, the compiler translates source code into bytecode which is not understood by the underlying operating system. So an application is needed that can convert this bytecode into machine code understood by the underlying operating system. It is accomplished using the Java Virtual Machine.



 
by Dinesh Thakur Category: Java Evolution

The JRE is the smallest set of executables and files that constitute the standard java plot form.The Java Runtime Environment (JRE) provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. In addition, two key deployment technologies are part of the JRE:



 
by Dinesh Thakur Category: Java Evolution

History of Java: At first glance, it may appear that Java was developed specifically for the World Wide Web. However, interestingly enough, Java was developed independently of the web, and went through several stages of metamorphosis before reaching its current status of programming language for the World Wide Web. Below is a brief history of Java.

 
by Dinesh Thakur Category: Data Type

A computer cannot store characters or integers. Computer can store information in the form of bits and bytes. The bit is a basic unit of information in computer. A bit can only have two values: yes or no, true or false, 1 or 0.



 
by Dinesh Thakur Category: Data Type

The scope of a variable specifies the region of the source program where that variable is known, accessible and can be used. In Java, the declared variable has a definite scope. When a variable is defined within a class, its scope determines whether it can be used only within the defined class or outside of the class also.

 
by Dinesh Thakur Category: Data Type

Java has a wide variety of data types from which we can choose the suitable for a particular purpose. To operate on variables from two different types of data we have to convert Both types to the same.



 

Page 3 of 40



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.