This section explains you How to learn Core Java? Follow these instructions to learn Java language step-by-step and become productive programmer.
How to learn Core Java
As you may be aware, Java is a general-purpose computer programming language that is object-inclined, class-based and concurrent, to name a few of its benefits. From the point of view of implementation, it is quite independent. Application developers can 'write once, run anywhere (WORA) with this popular programming language meaning that there is no need of compilation because a compiled Java code can run on all platforms that support this language.
Java applications are compiled to bytecode that can operate on any Java Virtual machine (JVM). Java, as mentioned, is one of the most well-liked programming languages. It caters to client-server web applications very well. It has 9 million developers.
This language was developed by James Gosling at Sun Microsystems. It was launched in the year 1995. The language has similarities in syntax with C and C++. Nonetheless, it has few low-level facilities than these languages.
Java can be installed like any other software (.exe). Java requires some environment variables after installation. These include Classpath and Java_Home. Classpath directs to the location of JDK home directory. It also comprises the address of the folder. It is at this address that jars get loaded by ClassLoader. Java_Home is again a variable that directs to the location of Java home directory.
Java, as a language, is designed to be portable. So, it is designed to run on any combination of hardware and operating system with ample runtime support.
Going on to the installation of Java, open the Command prompt. Write 'CMD' in run command and press 'Enter' to open Command prompt. In the Command prompt window, write 'java - version'. If Java is installed properly and all environment variables are configured well you will be able to see that Java has been installed.
The well-known first program to write in Java is "Hello World!!" The latest available version of Java is Java 8, the only version presently supported for free by Oracle. But, commercially, earlier versions are supported by Oracle and other companies.
There are many special classes of Java like Applet, Servlet, JavaServer Pages, Swing application and Generics. Java Applets are programs that are embedded in other applications e.g. in a Webpage displayed in a web browser. Going on to Java Servlet technology: it proffers Web developers with a simple, dependable system to extend the functionality of a Web server and to access existent business systems. Servlets are server-side Java EE mechanisms that produce responses (HTML pages, for instance) to requests (usually HTTP requests) from clients. Speaking generally, it is an Applet that runs on the server side. JavaServer pages are server-side Java EE components that produce responses, like HTML pages to HTTP requests from potential clients. JSPs embed Java code in an HTML page. A Java server page is compiled to a Java Servlet when it is accessed for the first time. Following that, the Servlet that is created produces the response.
Swing is generated for the Java SE platform. It is a GUI library. GUI stands for Graphical User Interface. Swing typically has a pluggable appearance and mode of functioning. Swing in Java SE 6 caters to the problems of the absence of these aspects by the usage of more native GUI widget drawing routines of the underlying platforms.
Generics became part of Java, J2SE 5.0 in 2004. Earlier, each variable declaration had to belong a particular type. Generics allow compile-time type checking but you do not need to prepare many container classes because each contains almost similar codes. Efficient codes are enabled and some runtime exceptions are changed into compile-time errors, a feature called type safety. SO, that is all about core Java and how to and what to learn of this language.
Here are the tutorials for learning the Java Programming language:
1. How to get started with Java
- Core Java Programming Home
- Introduction to Java.
- Java History
- Features of Java, Features of Java Programming Language
- Java Virtual Machine
- JVM vs. JDK
- Encapsulation in Java
2. Getting started with Java
- Getting Java, Installing Java and Configuring Java on your system (JDK 6), How to Install JDK 8 on Windows?.
- Understanding the directory structure of JDK (Java SDK).
- Writing first Java Program
- How to write first Java program in Eclipse?
- How to run first Java program in Eclipse?
- Running Hello World example in Eclipse IDE
3. Java basics
- Basic Syntax
- Object & Classes - Object & Classes Examples
- Basic Data types - Basic Data types Examples
- Variable Types - Variable Examples
- Modifier Types - Examples of java modifiers
- Basic Operators - Examples of operator in java
- Loop Control
- Decision Making
- Numbers - Number Examples
- Characters - Characters Examples
- Strings - Strings Examples
- Date & Time - GregorianCalender Examples
- Regular Expressions
- Arrays - Arrays Examples
- Files and I/O - Files and I/O Examples
- Java Read File
- Java Write File
- Java Copy File Content
- Java Copy File From One Directory to Another
- Exceptions Exceptions Examples
- Find File In A Given Directory
- Java File Chooser Example
- List All Files And Directories In A Directory
4. Writing of object oriented programs
- Introduction to object oriented programming.
- Creating object of the class.
- Calling a methods of object.
- Working with static methods and fields.
- Working with packages.
- Adding comments to a class.
Browse complete listing of Core Java tutorials at Core Java Programming Home section.