Skip to content
OctopusCodes

OctopusCodes

  • Web Development
    • HTML Tutorial
    • CSS Tutorial
    • JavaScript Tutorial
    • BootStrap Tutorial
    • JQuery Tutorial
    • Angular Tutorial
    • ReactJS Tutorial
    • Express.js Tutorial
    • ECMAScript Tutorial
  • Mobile
    • Android Tutorial
    • Flutter Tutorial
    • React Native Tutorial
  • Java
    • Java Tutorial
    • JDBC Tutorial
    • Hibernate Tutorial
    • Spring MVC Tutorial
    • Spring Web API Tutorial
    • Spring Data JPA Tutorial
    • Spring Data MongoDB Tutorial
    • Spring Boot Microservices Tutorial
    • JSF Framework Tutorial
    • Struts Framework Tutorial
    • JSP-Servlet Tutorial
    • Java Swing Tutorial
  • .NET Core
    • C# Tutorial
    • Entity Framework Core Tutorial
    • ASP.NET Core MVC Tutorial
    • ASP.NET Core Web API Tutorial
    • ASP.NET Core Razor Pages Tutorial
    • ASP.NET Core Microservices Tutorial
  • PHP
    • PHP Tutorial
    • CodeIgniter Framework Tutorial
    • Laravel Framework Tutorial
    • Laravel Web API Tutorial
  • Python
    • Python Tutorial
    • Django Tutorial
  • Golang
    • Golang Tutorial
    • GoLang Web API Tutorial
    • Golang MongoDB Tutorial
    • Golang MySQL Tutorial
    • GORM Tutorial
  • Programming
    • C Tutorial
    • Dart Tutorial
  • Database
    • SQL Server Tutorial
    • MySQL Tutorial
    • MongoDB Tutorial
Main Menu

Variables and Data Types with Real Life Examples

This post will provide real life examples how to use variables and data types in Java

  • Get Size, Minimum and Maximum Value of Data Types in Java
  • Show Java Text in Console Window in Java
  • Print an American Flag on The Screen in Java
TaggedVariables and Data Types with Real Life Examples

Java Tutorial

Basic Java
Installation
Install Java on Windows Install Eclipse to Run Java
Variables & DataTypes
Variables & Data Types Type Casting Convert String to Other Data Types Convert Primitive Data Type to String Assign Keyboard Input to Variables Real Life Examples
Operators
Arithmetic Operators Unary Operators Relational Operators Logical Operators Assignment Operators Real Life Examples
Control Flow Statements
If If-Else If-ElseIf-Else Nested If Switch Ternary Operator Real Life Examples
Loops
For Loop While Loop Do-While Loop For-Each Loop Nested Loops Break and Continue Real Life Examples
Methods
Declare Method Method Parameters Method Overloading Method Return Type Real Life Examples
Arrays
Declare and Initialize Array Multidimensional Arrays Real Life Examples
Strings
Declare String String charAt() Method String compareTo() Method String concat() Method String contains() Method String endsWith() Method String equals() Method String equalsIgnoreCase() Method String format() Method String getBytes() Method String indexOf() Method String isEmpty() Method String join() Method String lastIndexOf() Method String length() Method String replace() Method String replaceAll() Method String split() Method String startsWith() Method String substring() Method String toLowerCase() Method String toUpperCase() Method String trim() Method String valueOf() Method Real Life Examples
Exceptions
Try Catch Block Finally Block Nested Try Catch Block Throw Keyword Throws Keyword Custom Exception Real Life Examples
Intermediate Java
Object Oriented Programming (OOPs)
Classes and Objects Constructors Inheritance Abstract Class Polymorphism Interfaces Nested Classes Declare and Initialize Array of Objects Real Life Examples
Date and Time
Declare Date and Time Date Format Calendar Java 8 Date Time Real Life Examples
Collections
List Set Map Iterator Real Life Examples
File Input Output
File Operations Directory Operations Real Life Examples
Input Output Streams
OutputStream InputStream Real Life Examples
Advanced Java
Lambda Expressions
Use forEach Method Filter Collection in Stream Use Like Operator Use Sort Operator Use Limit Operator Find the First Element in Stream Use Sum Operator Use Count Operator Use Min Operator Use Max Operator Use Average Operator Use Group By Operator Real Life Examples
Regular Expressions
Common Matching Symbols Meta Characters Quantifier Grouping and Back Reference Negative Look Ahead Specifying Modes Inside Regular Expression Backslashes Real Life Examples
Annotation
Declare Custom Annotation Class Level Annotation Field Level Annotation Method Level Annotation Single-Value Annotation Multi-Value Annotation Real Life Examples
MultiThreading
Thread Class Runnable Interface Thread Sleep Thread Join Thread States Wait Method Notify Method NotifyAll Method Safety and Synchronization Exception in Thread Main Safety in Singleton Class Daemon Thread Thread Pool Callable Future Timer Thread Thread Deadlock FutureTask Real Life Examples
Generics
Generic Classes Generic Interfaces Generic Methods Generic Types Bounded Type Parameters Inheritance Wildcard Real Life Examples
Reflection
Reflection of Classes Reflection of Fields Reflection of Methods Reflection of Constructors Reflection of Annotations Invoke Method Invoke Method with Parameters Real Life Examples
Internationalization
Use Locale Class Percentages Formatting Long Numbers Formatting Numbers Formatting Money Formatting Symbols and Currencies Date Formatting Getting Messages from Resource Bundles Real Life Examples

Contact Us

octopuscodes@gmail.com

Top Tutorials

  • Spring MVC Framework Tutorial
  • Entity Framework Core Tutorial
  • ASP.NET Core MVC Tutorial
  • ASP.NET Core Web API Tutorial
  • Angular Tutorial
  • ReactJS Tutorial
  • Flutter Tutorial
  • Laravel Framework Tutorial
  • MongoDB Tutorial
Copyright © 2025 OctopusCodes.