Core Java Tutorial

Java Tutorial or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. Let’s start learning Java from basic questions like what is Java tutorial, Core Java, where it is used, what type of applications are created in Java, why use java and Java platforms etc. Our Java tutorial helps you to learn Java with easy and simple examples.

How to Print Diamond Pattern in Java Programming Language?

Print Diamond Pattern To print diamond pattern in Java Programming, you have to use six for loops, the first for loop (outer loop) contains two for loops, in which the first for loop is to print the spaces, and the second for loop print the stars to make the pyramid of stars. Now the second for loop (outer loop) also contains the two for loop, in which the first for loop …

How to Print Diamond Pattern in Java Programming Language? Read More »

How to Print Patterns of Numbers and Stars in java programming language?

To print patterns of numbers and stars (*) in Java Programming, you have to use two loops, first is an outer loop and the second is the inner loop. The outer loop is responsible for rows and the inner loop is responsible for columns. Java Programming Code to Prints Patterns Following are the one by …

How to Print Patterns of Numbers and Stars in java programming language? Read More »

Most Important Commonly Asked Java Programming Interview Questions

Dear readers, these Java programming Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my experience, good interviewers hardly planned to ask any particular question during your interview, normally questions start with some basic concept …

Most Important Commonly Asked Java Programming Interview Questions Read More »

Java History

Java History • Java is a general purpose , object-oriented programming language. • The fastest growing programming language in the history of computing • Developed by Sun Microsystems of USA in 1991. • Originally it is called Oak by James Gosling. • Originally designed in 1991 for use in embedded consumer applications • Java team …

Java History Read More »

Java Features

• Simple • Architecture-neutral • Object-oriented • Portable • Distributed • High-performance • Interpreted • Multithreaded • Robust • Dynamic • Secure Simple: Java is a simple language as it does not use pointers, preprocessor header files; go to statement and many more others. Object oriented: In Java everything is object. All program code and …

Java Features Read More »

Benefits of Java over C and C++

Benefits of Java over C and C++ • Architecturally neutral. Once written, the same Java program can be run on any platform computer and operating system) that supports Java. • Entirely object-oriented. Existing code can be easily re-used and maintained. • Secure. Dangerous program actions are prohibited. • Supports Internet programming. Java applets are run …

Benefits of Java over C and C++ Read More »

How Java works

How Java works • To develop and distribute a Java program 1. Programmer codes Java source statements 2. Java compiler converts source statements into bytecode (platform-independent object     language) 3. Bytecode is copied to the target platform • To execute a Java program 1. Platform-dependent Java Virtual Machine (JVM) software must be installed 2. A copy …

How Java works Read More »

The Java Programming Language

The Java Programming Language Java is a high-level programming language that is all of the following: • Simple • Architecture-neutral • Object-oriented • Portable • Distributed • High-performance • Interpreted • Multithreaded • Robust • Dynamic • Secure Java is also unusual in that each Java program is both compiled and interpreted. With a compiler, …

The Java Programming Language Read More »

The Java Platform

A platform is the hardware or software environment in which a program runs. The Java platform differs from most other platforms in that it’s a software-only platform that runs on top of other, hardware-based platforms. Most other platforms are described as a combination of hardware and operating system. The Java platform has two components: • …

The Java Platform Read More »

Java Development Kit (JDK)

The Java Development Kit comes with a collection of tools that are used for developing and running Java programs. They include: • appletviewer ( for viewing Java applet) • javac (Java compiler) • java (Java Interpreter) • javap (Java disassembler) • javah (for C header files) • javadoc (for creating HTML documents) • jdb (Java …

Java Development Kit (JDK) Read More »

Disadvantages of Java

Disadvantages of Java � Not supported by all platforms (though third-party JVM software is usually available) � Slower in execution than compiled languages � Restricts or prohibits machine-level operations required by certain applications (operating systems, etc.)  

Developing the Java Application

Developing the Java Application A Java application is a standalone Java program– a program written in the Java language that runs independently of any browser. Example: /** * The HelloWorldApp class implements an application that * simply displays “Hello World!” to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println(“Hello …

Developing the Java Application Read More »

Comments in Java Code | Overview of Java Language

Comments in Java Code The bold characters in the following listing are comments. /** * The HelloWorldApp class implements an application that * simply displays “Hello World!” to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println(“Hello World!”); //Display the string. } } The Java language supports three kinds of …

Comments in Java Code | Overview of Java Language Read More »

Defining a Class | Overview of Java Language

Defining a Class The first bold line in the following listing begins a class definition block. /** * The HelloWorldApp class implements an application that * simply displays “Hello World!” to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println(“Hello World!”); //Display the string. } } A class–the basic building …

Defining a Class | Overview of Java Language Read More »

The main Method | Overview of Java Language

The main Method The first bold line in the following listing begins the definition of a main method. /** * The HelloWorldApp class implements an application that * simply displays “Hello World!” to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println(“Hello World!”); //Display the string. } } Every Java …

The main Method | Overview of Java Language Read More »

Using Classes and Objects

Using Classes and Objects The “Hello World” application is about the simplest Java program one can write that actually does something. Because it is such a simple program, it doesn’t need to define any classes except for HelloWorldApp. The “Hello World” application does use another class–the System class–that is part of the API (application programming …

Using Classes and Objects Read More »

Java Program Structure | Overview of Java Language

Java Program Structure A Java program may contain one or more section which is as follow: 1. Documentation section (suggested) The documentation section comprises a set of comment line of the program, the author and other details, which the programmer would like to refer to at a later stage. 2. Package statement (Optional) This statement …

Java Program Structure | Overview of Java Language Read More »

Variables  

Variables are locations in memory in which values can be stored. Each one has a name, a type, and a value. Before we can use a variable, we have to declare it. After it is declared, we can then assign values to it. Java actually has three kinds of variables: 1. instance variables, 2. class …

Variables   Read More »

Scroll to Top