Category java

Introducing Class, Object and Methods

Class Fundamentals class classname { type instance-variable1; type instance-variable2; // … type instance-variableN;  type methodname1(parameter-list) { // body of method }  type methodname2(parameter-list) { // body of method }  // …  type methodnameN(parameter-list) { // body of method } }  Here is a class called Box that defines three instance variables: width, height, and depth.…

Program Control Statements

Decision Constructs Java supports two selection statements: if and switch. These statements allow you to control the flow of your program’s execution based upon conditions known only during run time.  The if-else Statement The if statement is Java’s conditional branch statement. It…

Data Types and Operators

Why Data Types are Important in Java? Java’s Primitive Types Java defines eight primitive data types: byte, short, int, long, float, double, char and boolean. Group Description Integers This group includes byte, short, int, and long, which are for whole-valued…

Java Fundamentals

The History and Philosophy of Java Object-Oriented Programming Java Development Kit (JDK) The Java Development Kit is an implementation of either one of the Java Platforms; Standard Edition, Enterprise Edition, of Micro Edition platforms released by Oracle Corporation in the…

Building REST service in Microservices with Spring Boot – Day 2

What is Java System Properties and Spring Application Configuration? Java System Properties Java maintains a set of system properties for its operations. Each java system property is a key-value (String-String) pair. For example, one such system property is “java.version”=”1.7.0_09“. All…

Java Class, Object and Method

Class Fundamentals A Java class is often used to represent a concept. A Java class is often used to store or represent data for the construct that the class represents. For example, you could create a model (a programmatic representation)…