Welcome to Java Tutorial by TutorialKart!
Java is a widely used programming language in developing software. This Java Tutorial is aimed to help beginners to get started with Java Programming language.
Java Tutorial
Java Programming Language is one of the most popular languages among developers. Most of the production servers, regular desktops, workstations, smartphones etc., are powered by Java.
In this Java Tutorial, we shall start with learning the basic and core concepts of Java. We shall also learn how to program and build applications using Java.
Java Tutorial Index
The following tutorials help you with the Java Basics and Object-Oriented Concepts in Java.
Get Started with Java in your PC
These Java tutorials help you understand what Java is, how to install Java on your personal computer, and how to start programming in Java using an Integrated Development Environment.
Java Basics
Following tutorials deal with the basic building blocks of Java programs, like how to write looping statements, decision-making statements; how to declare variables and how to understand their scope; what type of data can be stored in a variable.
- Structure of a Java Program
- Java – Data Types
- Java – Variable Types
- Java – Access Modifiers in Java
- Operators
- Java – Decision Making
- Java – Loops
- Java – Type Conversion
- Console Operations
- Classes and Objects
- Inheritance in Java
- Polymorphism in Java
- Abstraction in Java
- Encapsulation in Java
- Interfaces in Java
String
Strings and different operations on the Strings is usually the most used by Java programmers for developing software.
- Java – Print a string to console output
- Java – Read a string from console input
- Java – Create String from Char Array
- Java – Create String from Byte Array
- Java – Get Character at Specified Index from String
- Java – Get First Character from String
- Java – Get Last Character from String
- Java – Compare two Strings Lexicographically
- Java – Check if a String contains Another String
- Java – Compare Content of a String and CharSequence
- Java – Compare Content of a String and StringBuffer
- Java – Concatenate two strings
- Java – Check if two strings are equal
- Java – Get the index of the first occurrence of a substring in a string
- Java – Get the index of nth occurrence of a substring in a string
- Java – Replace the first occurrence of a substring with another(substring) in a string
- Java – Replace all occurrences of a substring with another(substring) in a string
- Java – Check if a String Ends with Specified Suffix String
- Java – Check if a String Starts with Specified Prefix String
- Java – Check if a String is Blank
- Java – Check if a String is Empty
- Java – Join Two or More Strings with Delimiter
- Java – Join Elements of String Array with Delimiter
- Java – Join Elements of ArrayList<String> with Delimiter
- Java – Reverse a string
- Java – Trim String
- Java – Split String
- Java – Validate Phone Number
- Java – Remove White Spaces in the String
- Java – Replace Multiple Spaces with Single Space
Java Array
Array is a collection of elements.
Elements in an array are ordered. So, you can access the elements of an array using index.
Array has a fixed length. Once an array is initialized with a specific size, you cannot alter the size of it.
Following Java Tutorials help you understand what an Array is, and how to use in programs.
- Java Array
- Java Array – Initialize
- Java Array – Print
- Java Array of Integers
- Java Array of Strings
- Java Array of Objects
- Java Array of Arrays
- Java Array – Iterate over Elements
- Java Array – For Loop
- Java Array – While Loop
- Java Array – ForEach
- Java Array – Append Element(s)
- Java Array – Check if Empty
- Java Array – Average
- Java Array – Check if Array contains Element
- Java Array – Find Index of Item in Array
- Java Array – Sum
- Java Array – Concatenate
- Java Array – Find Smallest Number
- Java Array – Find Largest Number
- Java Array – Reverse
File Operations
Java provides an inbuilt library to handle file operations like reading a file; writing to a file; appending data to an existing file; or deleting a file. Following example help you with the execution of file operations programmatically using Java.
- Read contents of a File line by line using BufferedReader
- Read contents of a File line by line using Stream in Java 8
- Filter list of files or directories in a folder using Java
- Java Copy File
- Java Delete File
- Java Rename File
- Java – Download File from URL
- Java – Replace a String in File
Java ArrayList Operations
ArrayList is a Class in Java that is used as a Collection. Following tutorials help you deal some of the operations that can be performed on ArrayLists.
- Print all elements of an ArrayList in Java
- Insert an Element at a specific position in ArrayList in Java
- Delete Nth element of an ArrayList in Java
- Convert String Array to ArrayList in Java
Java Date Operations
Design Patterns in Java
Exception Handling in Java
- Call Stack
- Try Catch Block
- Try With Resource
Java Exceptions
- ArithmeticException
- ArrayIndexOutOfBoundsException
- ArrayStoreException
- ClassCastException
- IllegalArgumentException
- IllegalMonitorStateException
- IllegalStateException
- IllegalThreadStateException
- IndexOutOfBoundsException
- NegativeArraySizeException
- NullPointerException
- NumberFormatException
- SecurityException
- StringIndexOutOfBoundsException
- UnsupportedOperationException
Java StringBuilder
- Java StringBuilder – append()
- Java StringBuilder – appendCodePoint()
- Java StringBuilder – capacity()
- Java StringBuilder – charAt()
- Java StringBuilder – chars()
- Java StringBuilder – codePointAt()
- Java StringBuilder – codePointBefore()
- Java StringBuilder – codePointCount()
- Java StringBuilder – codePoints()
- Java StringBuilder – delete()
- Java StringBuilder – deleteCharAt()
- Java StringBuilder – ensureCapacity()
- Java StringBuilder – getChars()
- Java StringBuilder – indexOf()
- Java StringBuilder – insert()
- Java StringBuilder – lastIndexOf()
- Java StringBuilder – length()
- Java StringBuilder – offsetByCodePoints()
- Java StringBuilder – replace()
- Java StringBuilder – reverse()
- Java StringBuilder – setCharAt()
- Java StringBuilder – setLength()
- Java StringBuilder – subSequence()
- Java StringBuilder – substring()
- Java StringBuilder – toString()
- Java StringBuilder – trimToSize()
Java ArrayList
- Java ArrayList – add()
- Java ArrayList – addAll()
- Java ArrayList – clear()
- Java ArrayList – clone()
- Java ArrayList – contains()
- Java ArrayList – ensureCapacity()
- Java ArrayList – forEach()
- Java ArrayList – get()
- Java ArrayList – indexOf()
- Java ArrayList – isEmpty()
- Java ArrayList – iterator()
- Java ArrayList – lastIndexOf()
- Java ArrayList – listIterator()
- Java ArrayList – remove()
- Java ArrayList – removeAll()
- Java ArrayList – removeIf()
- Java ArrayList – removeRange()
- Java ArrayList – retainAll()
- Java ArrayList – set()
- Java ArrayList – size()
- Java ArrayList – spliterator()
- Java ArrayList – subList()
- Java ArrayList – toArray()
- Java ArrayList – trimToSize()
Java HashMap
- Java HashMap – clear()
- Java HashMap – clone()
- Java HashMap – compute()
- Java HashMap – computeIfAbsent()
- Java HashMap – computeIfPresent()
- Java HashMap – containsKey()
- Java HashMap – containsValue()
- Java HashMap – entrySet()
- Java HashMap – get()
- Java HashMap – isEmpty()
- Java HashMap – keySet()
- Java HashMap – merge()
- Java HashMap – put()
- Java HashMap – putAll()
- Java HashMap – remove()
- Java HashMap – size()
- Java HashMap – values()
Java HashSet
- Java HashSet – add()
- Java HashSet – clear()
- Java HashSet – clone()
- Java HashSet – contains()
- Java HashSet – isEmpty()
- Java HashSet – iterator()
- Java HashSet – remove()
- Java HashSet – size()
- Java HashSet – spliterator()
Java Example Programs
Useful Resources
Conclusion
We have gone through the basics of Java Programming, Object Oriented Programming concepts with Java, and some of the useful classes and their methods in Java.