In this article we will see what is Java Programming Language ? Where to use Java, features of Java and basic syntax of Java programming language.

What is Java ?

Java is a well known, most popular, opensource and object oriented high level programming language. Java is simple, robust, Architectural-neutral, Portable, Distributed and Dynamic programming language.

Where to use Java ?

Being platform independent in nature, java has emerged as one of the most popular programming language of today. According to Sun?s official website, java runs on over 3 millions devices and increasing. That means ?Java is simply Everywhere?, here are fewuse cases of Java Programming Language.

1) Desktop Applications such as Browsers, Store Softwares, Media player, antivirus etc.
2) Web Applications such as, etc.
3) Mobile Applications, Android applications are merely developped in Java programming language.
4) Robotics, Games and Artificial Intelligence.
5) Embedded Systems like TV Remotes, Digital keyboards etc.

Welcome to the Core Java Tutorials series, be here for couple of weeks and follow the series step by step. You guys are going to view one of the best content over internet as if today. Let?s start our journey to be a Core Java expert by following this Java Programming Tutorials series.

Import newly created Java project in Eclipse, you will find a pom.xml file, replace this with the content written below:
<project xmlns="" xmlns:xsi=""


			<name>Spring GA Repository</name>

What is "spring-boot-starter-web" dependency ?

In order to add web compatibilities to the project we just need to add "spring-boot-starter-web" as shown below, everything else related to required dependencies and their veriosn will be handled by Spring Boot itself.

What is spring-boot-maven-plugin ?

The Spring Boot Maven Plugin provides Spring Boot support in Maven, letting you package executable jar or war archives and run an application ?in-place?. To use it, you must use Maven 3.2 (or later).

4) Create a spring boot application launch class


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

 * Hello world!
public class App {
	public static void main(String[] args) {
		ApplicationContext context =, args);
		System.out.println("Hello !");
In this class we have instantiated ApplicationContext, this will load all the Spring beans as per the configuration. We have also passed command line arguments to it, that will convert them to spring properties.

@SpringBootApplication Annotation

@SpringBootApplication Annotation added to "App", is a combined annotation for following three annotations:

1) @SpringBootConfiguration

It a new version of "@Configuration" annotation intriduced in Boot 2.0 with exactly same working as "@Configuration", it indicates that the class will be used as an configuratin class and shall be scanned for further configurations and bean definitions

2) @EnableAutoConfiguration

This annotation is used to enable auto-configuration of the Spring Application Context, attempting to guess and configure beans that you are likely to need. Auto-configuration can be disabled using one of the two methods:

2.1) Using "excludeName" in the annotation as shown below: @EnableAutoConfiguration(excludeName = {"multipartResolver","myBean"})
2.2) Using the spring.autoconfigure.exclude property in properties file.

3) @ComponentScan

This annotation does the same work as "context:component-scan" does in xml based configuration, basePackageClasses() or basePackages() may be specified to define specific packages to scan. In absence of a specific packages defination, scanning will occur from the package of the class that declares this annotation.

5) Adding a web Controller

We can now add a Controller to the application to handle web requests: /src/main/java/com/tb/java/

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

public class ApplicationController {

	public String getName() {
		return "Simple Application";
@RestController annotation contains two annotations in it, @Controller and @ResponseBody, there is no need to add @ResponseBody in each @RequestMapping explicitly to return data rather than a view.

6) Run a spring boot (Maven) application

In order to run a boot application, following command can be used from the project home dircetory:

$ mvn spring-boot:run
This will print logs something like this, an embeded Tomcat will be started on Port 8080, with the application deployed on it.

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building ApiServer 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] >>> spring-boot-maven-plugin:2.0.4.RELEASE:run (default-cli) > test-compile @ ApiServer >>>


[INFO] --- spring-boot-maven-plugin:2.0.4.RELEASE:run (default-cli) @ ApiServer ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 :: Spring Boot ::        (v2.0.4.RELEASE)


2018-09-12 14:55:14.723  INFO 18861 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-09-12 14:55:14.728  INFO 18861 --- [           main]                          : Started App in 2.824 seconds (JVM running for 6.412)
Hello !

7) Testing URL mapping

We can now test a url response added in ""

$ curl http://localhost:8080/name
Simple Application
  • By
  • Feb 14, 2015
  • Core Java