Home Java Overview Maven Tutorials

Core java tutorials overview for selenium with examples

Hello Friends this section will cover the core java tutorial which is enough to learn selenium automation tool.

For Video : CLICK HERE

What is Java ?

Access Specifier in java

Data Types in Java

What is java ?

Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).

Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.

Java is:
Object Oriented: In Java, everything is an Object. Java can be easily extended since it is based on the Object model.
Platform independent: Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.

Simple: Java is designed to be easy to learn. If you understand the basic concept of OOP Java would be easy to master.

Secure: With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.

Architectural-neutral :Java compiler generates an architecture-neutral object file format which makes the compiled code to be executable on many processors, with the presence of Java runtime system.

Portable:Being architectural-neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler in Java is written in ANSI C with a clean portability boundary which is a POSIX subset.

Robust:Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.

Multithreaded: With Java's multithreaded feature it is possible to write programs that can do many tasks simultaneously. This design feature allows developers to construct smoothly running interactive applications.

Interpreted:Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light weight process.

High Performance: With the use of Just-In-Time compilers, Java enables high performance.

Distributed:Java is designed for the distributed environment of the internet.

Dynamic: Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.

Access specifier in Java

Public , Private & protected Keywords :

private - Only the current class will have access to the field or method.

protected - Only the current class and subclasses (and sometimes also same-package classes) of this class will have access to the field or method.

public - Any class can refer to the field or call the method.

PrivateNon modifierProtectedPublic
Same package sub classNoYesYesYes
Same package non sub classNoYesYesYes
Different package subclassNoNoYesYes
Different package non subclassNoNoNoYes

Access ModifierWithin ClassWithin PackageOutside package by sub class onlyOutside Package

Why Java is platform independent language:

Javac – compiler that converts source code to byte code.

JVM- interpreter that converts byte code to machine language code.

As we know java is both compiler & interpreter based language. Once the java code also known as source code is compiled, it gets converted to native code known as BYTE CODE which is portable & can be easily executed on all operating systems. Byte code generated is basically represented in hexa decimal format.

After compilation, the interpreter reads the generated byte code & translates it according to the host machine. . Byte code is interpreted by Java Virtual Machine which is available with all the operating systems we install. so to port Java programs to a new platform all that is required is to port the interpreter and some of the library routines.

Source code -> javac ->Universal byte code

Universal byte ->jvm/java -> execute them on a particular machine.

Data Types in Java:

Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory.

There are two data types available in Java:

• Primitive Data Types

• Reference/Object Data Types

Primitive Data Types:

byte: • Byte data type is an 8-bit signed two's complement integer.
• Minimum value is -128 (-2^7)
• Maximum value is 127 (inclusive)(2^7 -1)
• Default value is 0

short: • Short data type is a 16-bit signed two's complement integer.
• Minimum value is -32,768 (-2^15)
• Maximum value is 32,767 (inclusive) (2^15 -1)

int: • Int data type is a 32-bit signed two's complement integer.
• Minimum value is - 2,147,483,648.(-2^31)
• Maximum value is 2,147,483,647(inclusive).(2^31 -1)

long: • Long data type is a 64-bit signed two's complement integer.
• Minimum value is -9,223,372,036,854,775,808.(-2^63)
• Maximum value is 9,223,372,036,854,775,807 (inclusive). (2^63 -1)

float: • Float data type is a single-precision 32-bit IEEE 754 floating point

double: • double data type is a double-precision 64-bit IEEE 754 floating point.

boolean: • boolean data type represents one bit of information.
• There are only two possible values: true and false.

char: • char data type is a single 16-bit Unicode character.

Reference Data Types:
• Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed.


  1. This is an amazing piece of work. Keep it up. java training in chennai

    1. IEEE Project Domain management in software engineering is distinct from traditional project deveopment in that software projects have a unique lifecycle process that requires multiple rounds of testing, updating, and faculty feedback. A IEEE Domain project Final Year Projects for CSE system development life cycle is essentially a phased project model that defines the organizational constraints of a large-scale systems project. The methods used in a IEEE DOmain Project systems development life cycle strategy Project Centers in India provide clearly defined phases of work to plan, design, test, deploy, and maintain information systems.

      This is enough for me. I want to write software that anyone can use, and virtually everyone who has an internet connected device with a screen can use apps written in JavaScript. JavaScript Training in Chennai JavaScript was used for little more than mouse hover animations and little calculations to make static websites feel more interactive. Let’s assume 90% of all websites using JavaScript use it in a trivial way. That still leaves 150 million substantial JavaScript Training in Chennai JavaScript applications.

  2. we get lots of information from your article.i hope in upcomming days we will get more latest information.

  3. It's very useful blog post with inforamtive and insightful content and i had good experience with this information.I have gone through CRS Info Solutions Home which really nice. Learn more details About Us of CRS info solutions. Here you can see the Courses CRS Info Solutions full list. Find Student Registration page and register now. Go through Blog post of crs info solutions. I just read these Reviews of crs really great. You can now Contact Us of crs info solutions. You enroll for <a href="

  4. Thanks for sharing this post and the efforts you have made in writing this. If you have more info about Software testing companies, please share. I looking forward to hearing from you.

  5. Thanks for sharing such outstanding look sharing whit us. Some points express here were new for me and it was really amazing to go during such educational post. it’s very useful for me & for other I hope you will share some more Please keep sharing! If you want to learn Python programming in Delhi. Tutorial And Example provide you the best tutorial free.

  6. Thanks you very much for sharing nice article - Java Vogue

  7. Im thankful for the article post .Thanks Again. Fantastic.
    data science training
    python training

  8. Excellent data with lots of information. I have bookmarked this page for my future reference. Do share more updates.
    Salesforce Mobile App Development
    Salesforce Mobile Development