- Java - First Steps
- Installing Java in Ubuntu
- Installing Java in Windows
- Writing First Java Program – Hello World
- Primitive Data Types in Java
- Variables in Java
- Methods in Java
- Java OOPS Concepts
- Abstraction in Java
- Encapsulation in Java
- Inheritance in Java
- Polymorphism in Java
- Method Overloading in Java
- Method Overriding in Java
- Operators in Java
- Assignment, Arithmetic And Unary Operators in Java
- Equality And Relational Operators in Java
- Conditional Operators in Java
- Ternary Operator in Java
- instanceof Operator in Java
- Conditional Statements & Loops in Java
- Java if-else Statement With Examples
- Java switch case Statement With Examples
- Java break Statement With Examples
- Java Continue Statement With Examples
- for Loop in Java With Examples
- while Loop in Java With Examples
- do-while loop in Java With Examples
- Java Class & Objects
- Class in Java
- Object in Java
- Constructor in Java
- Initializer Block in Java
- Access Modifiers in Java
- Object Class in Java
- Object Cloning in Java Using clone() Method
- Interface in Java
- Interface in Java
- Marker Interface in Java
- Default Methods in Java Interface
- Static Methods in Java Interface
- Private Methods in Java Interface
- String in Java
- Java String Class With Method Examples
- Java StringBuffer With Method Examples
- Java StringBuilder With Method Examples
- Why String is Immutable in Java
- Compare Two Strings in Java - equals, compareTo() methods
- Search String in Another String in Java - indexOf, lastIndexOf, contains methods
- Java String - substring() Method Example
- Check if a String is Null or Empty in Java
Tag: java-basics
while Loop in Java With Examples
do-while loop in Java With Examples
Private Methods in Java Interface
JShell in Java
The Java Shell or JShell is an interactive command line tool for learning the Java programming language and to test Java code. JShell is a Read-Evaluate-Print Loop (REPL), which evaluates declarations, statements, and expressions as they are typed and immediately shows the results. This way you don’t need to write…
Java var Type (Local Variable Type Inference)
In this post we’ll discuss a feature called local variable type inference which is included in Java 10. A new reserved type name “var” is added in Java to define and initialize local variables. Note that var is not a keyword, it’s a reserved type name. So your existing variable…
Method Overloading in Java
In Java you can have two or more methods having the same name with in the same class provided their arguments differ in either type or number. These types of methods are called overloaded methods and the process is known as method overloading in Java. Method overloading in Java –…
super in Java With Examples
Super keyword in Java is used to refer to the immediate parent class of the sub class. You can use super keyword in Java in following ways- You can invoke the constructor of the parent class, doing that using super makes your code more compact and classes are better encapsulated.…
static in Java With Examples
Static keyword in Java is used to create variables and methods that are associated with the class rather than with any object of the class. Table of contents Static in Java static variables in Java Static variables usage static methods in Java static method access restrictions Static method usage Static…
Java Ternary Operator With Examples
In the post conditional operators in Java we talked about the Conditional-AND and Conditional-OR operators, here we’ll talk about another conditional operator known as ternary operator in Java (?:). Ternary operator uses three operands thus the name ternary operator and it can be used in place of if-else statement or…