Skip to content

Tutorial KartTutorialKart

×
C++ Java PHP Python Kotlin Swift JavaScript Golang
  • Java Basics
  • Java Tutorial
  • Java Installation
  • Java HelloWorld Program
  • Java Program Structure
  • Java Data Types
    • byte
    • short
    • int
    • long
    • float
    • double
    • boolean
    • char
  • Java Variables
    • Java Variable Types
  • Java Access Modifiers
  • Java Operators
    • Arithmetic Operators
    • Assignment Operators
    • Relational Operators
    • Logical Operators
    • Bitwise Operators
  • Java Decision Making
    • If statement
    • If-Else statement
    • If-Else-If statement
    • Switch statement
  • Java Loops
    • Java While Loop
    • Java Do-while Loop
    • Java For Loop
    • Java ForEach
    • Java Break
    • Java Continue
    • Nested While Loop
    • Nested For Loop
    • Infinite While Loop
    • Infinite For Loop
  • Java Array
    • Java Array
    • Print array
    • Initialize array
    • Array of integers
    • Array of strings
    • Array of objects
    • Array of arrays
    • Iterate over array
    • Array For loop
    • Array while loop
    • Append element to array
    • Check if array is empty
    • Array average
    • Check if array contains
    • Array ForEach
    • Array - Find Index of Item
    • Array sum
    • Concatenate arrays
    • Find smallest number in array
    • Find largest number in array
    • Array reverse
  • Java OOPs
    • Classes and Objects
    • Inheritance
    • Polymorphism
    • Method Overloading
    • Method Overriding/
    • Abstraction
    • Abstract methods and classes
    • Interfaces
    • Encapsulation
    • Polymorphism
  • Java String
    • Basics
    • Print string
    • Read string from console
    • Create string from Char array
    • Create string from Byte array
    • Concatenate two strings
    • Get index of the first Occurrence of substring
    • Get index of nth occurrence of substring
    • Checks
    • Check if two strings are equal
    • Check if string ends with specific suffix
    • Check if string starts with specific prefix
    • Check if string is blank
    • Check if string is empty
    • Check if string contains search substring
    • Validate if string is a Phone Number
    • Character Level
    • Get character at specific index in string
    • Get first character in string
    • Get last character from string
    • Transformations
    • Replace first occurrence of string
    • Replace all occurrences of a string
    • Join strings
    • Join strings in string array
    • Join strings in ArrayList
    • Reverse a string
    • Trim string
    • Split string
    • Remove whitespaces in string
    • Replace multiple spaces with single space
    • Comparisons
    • Compare strings lexicographically
    • Compare String and CharSequence
    • Compare String and StringBuffer
  • Java Exception Handling
      StringIndexOutOfBoundsException
  • Java Type Conversions
    • Convert string to int
    • Convert string to float
    • Convert string to double
    • Convert string to long
    • Convert string to boolean
    • Convert int to string
    • Convert int to float
    • Convert int to double
    • Convert int to long
    • Convert int to char
    • Convert float to string
    • Convert float to int
    • Convert long to string
    • Convert double to string
    • Convert boolean to string
  • Java File Operations
    • Create a file
    • Read file as string
    • Write string to file
    • Copy File
    • Delete File
    • Rename File
    • Download File from URL
    • Replace a String in File
    • Filter list of files or directories
    • Check if file is readable
    • Check if file is writable
    • Check if file is executable
    • Read contents of a file line by line using BufferedReader
    • Read contents of a File line by line using Stream
  • Java Programs
    • Check if n is positive or negative
    • Read integer from console
    • Add two integers
    • Count digits in number
    • Largest of three numbers
    • Smallest of three numbers
    • Even numbers
    • Odd numbers
    • Reverse a number
    • Prime Number
    • Factorial
    • Print All Prime Numbers
    • Factors of a Number
    • Check Palindrome number
    • Check Palindrome string
    • Swap two numbers
    • Even or Odd number
  • Java Classes
  • Java ArrayList
    • ArrayList add()
    • ArrayList addAll()
    • ArrayList clear()
    • ArrayList clone()
    • ArrayList contains()
    • ArrayList ensureCapacity()
    • ArrayList forEach()
    • ArrayList get()
    • ArrayList indexOf()
    • ArrayList isEmpty()
    • ArrayList iterator()
    • ArrayList lastIndexOf()
    • ArrayList listIterator()
    • ArrayList remove()
    • ArrayList removeAll()
    • ArrayList removeIf()
    • ArrayList removeRange()
    • ArrayList retainAll()
    • ArrayList set()
    • ArrayList size()
    • ArrayList spliterator()
    • ArrayList subList()
    • ArrayList toArray()
    • ArrayList trimToSize()
  • Java HashMap
    • HashMap clear()
    • HashMap clone()
    • HashMap compute()
    • HashMap computeIfAbsent()
    • HashMap computeIfPresent()
    • HashMap containsKey()
    • HashMap containsValue()
    • HashMap entrySet()
    • HashMap get()
    • HashMap isEmpty()
    • HashMap keySet()
    • HashMap merge()
    • HashMap put()
    • HashMap putAll()
    • HashMap remove()
    • HashMap size()
    • HashMap values()
  • Java HashSet
    • HashSet add()
    • HashSet clear()
    • HashSet clone()
    • HashSet contains()
    • HashSet isEmpty()
    • HashSet iterator()
    • HashSet remove()
    • HashSet size()
    • HashSet spliterator()
  • Java Integer
    • Integer bitCount()
    • Integer byteValue()
    • Integer compare()
    • Integer compareTo()
    • Integer doubleValue()
    • Integer equals()
    • Integer floatValue()
    • Integer getInteger()
    • Integer intValue()
    • Integer longValue()
    • Integer max()
    • Integer min()
    • Integer reverse()
    • Integer reverseBytes()
    • Integer rotateLeft()
    • Integer rotateRight()
    • Integer shortValue()
    • Integer signum()
    • Integer sum()
    • Integer toBinaryString()
    • Integer toHexString()
    • Integer toOctalString()
    • Integer toString()
  • Java StringBuilder
    • StringBuilder append()
    • StringBuilder appendCodePoint()
    • StringBuilder capacity()
    • StringBuilder charAt()
    • StringBuilder chars()
    • StringBuilder codePointAt()
    • StringBuilder codePointBefore()
    • StringBuilder codePointCount()
    • StringBuilder codePoints()
    • StringBuilder delete()
    • StringBuilder deleteCharAt()
    • StringBuilder ensureCapacity()
    • StringBuilder getChars()
    • StringBuilder indexOf()
    • StringBuilder insert()
    • StringBuilder lastIndexOf()
    • StringBuilder length()
    • StringBuilder offsetByCodePoints()
    • StringBuilder replace()
    • StringBuilder reverse()
    • StringBuilder setCharAt()
    • StringBuilder setLength()
    • StringBuilder subSequence()
    • StringBuilder substring()
    • StringBuilder toString()
    • StringBuilder trimToSize()
  • Java java.util.Arrays
    • Arrays.asList()
    • Arrays.copyOf()
    • Arrays.sort()
  • Java Random
    • Random doubles()
    • Random ints()
    • Random longs()
    • Random next()
    • Random nextBoolean()
    • Random nextBytes()
    • Random nextDouble()
    • Random nextFloat()
    • Random nextGaussian()
    • Random nextInt()
    • Random nextLong()
    • Random setSeed()
  • Java Math
    • Math abs
    • Math acos
    • Math asin