Java Programming Language
Java Recent Articles!
Java Output & Multiple Choice Questions
Overview, Basics, OOP concepts, Inheritance Operators, Strings, Input and Output, Arrays , Arrays Class, Important Keywords in Java ,Java vs C++, Methods in Java, Constructors, Exception Handling, Regular Expressions, Interfaces and Abstract Classes, Java Packages, Multithreading, Garbage Collection, Wrapper Classes, Reflection in Java, File Handling, Collection in Java, Collection Interview FAQ’s ,Collections Class (Contains utility functions on Collections), Useful and/or Advanced Features, Image Processing, Networking in Java, Interview Questions, Misc, Multiple Choice Questions, Java 8 Stream Methods
- How to start learning Java
- Setting up the environment
- The Hello World Example(Practice)
- Java Naming Conventions
- JVM
- JVM Stack Area
- JVM Shutdown Hook
- Java Class File
- Differences between JDK, JRE and JVM
- Does JVM create object of Main class?
- How is Java platform independent?
- JDBC Drivers
- Is main method compulsory in Java?
- File names and class names
- How to run java class file which is in different directory?
- Microservices Introduction
- Using predefined class name as Class or Variable name in Java
- How do I become a good Java programmer?
- Java Identifiers
- Data types
- How to define our own data type in java(enum)
- Enum with Customized Value
- StringBuffer appendCodePoint() Method
- Variables
- Scope of Variables
- Final variables
- Bounded Type Parameters
- Loops in Java(Practice)
- For-each loop in Java
- For Loop in Java | Important points
- Decision Making(if, if-else, switch, break, continue, jump)(Practice)
- Switch Statement in Java(Practice)
- String in Switch Case in Java
- Forward declarations
- Widening Primitive Conversion
- Type conversion in Java
- Comments in Java
- Does Java support goto?
- Interesting facts about null in Java
- Using _ (underscore) as variable name
- Currying Functions in Java with Examples
- Using underscore in Numeric Literals
- Binary search in Java
- Sorting in Java
- Classes and Objects
- Java object storage
- Different ways to create objects in Java
- How to swap or exchange objects
- Inheritance in Java
- Encapsulation in Java
- Abstraction in Java
- Run-time Polymorphism in Java
- Association,Composition and Aggregation
- Access and Non Access Modifiers in Java
- Access Modifiers
- this reference
- Method Overloading
- Output of Java program | Set 22 (Overloading)
- Method Overriding
- Output of Java program | Set 18 (Overriding)
- Understanding “static” in “public static void main” in Java
- Overloading or Overriding static methods
- Shadowing of static methods(Also called Method Hiding)
- Static methods vs Instance methods in Java
- Assigning values to static final variables in Java
- Covariant return types
- Object class
- Static class in Java
- Flexible nature of java.lang.Object
- Overriding equals method of Object class
- Overriding toString() method of Object class
- Instance Variable Hiding
- Static blocks in Java
- initializer block in java
- instance initializer block in java(non-static block)
- Static vs Dynamic Binding
- Why Java is not a purely Object-Oriented Language?
- Understanding Classes and Objects in Java
- Inheritance in Java
- Multiple Inheritance
- Why Java does’nt support Multiple Inheritance – The Diamond Problem
- Java Object Creation of Inherited Class
- Inheritance and constructors
- Interfaces and Inheritance
- Using final with Inheritance
- Accessing Grandparent’s member
- Override private methods
- More restrictive access to a derived class method in Java
- Parent and Child classes having same data member
- Object Serialization with Inheritance
- Referencing Subclass objects with Subclass vs Superclass reference
- Does overloading work with inheritance
- Output of Java Program | Set 20 (Inheritance)
- String Class(Practice)
- StringBuffer Class
- Initialize and Compare Strings
- StringTokenizer class
- String vs StringBuilder vs StringBuffer
- StringJoiner in Java8
- When to use StringJoiner over StringBuilder?
- StringJoiner add() method in Java
- StringJoiner length() method in Java
- StringJoiner toString() method in Java
- StringJoiner setEmptyValue() method in Java
- StringJoiner merge() method in Java
- Integer to String Conversions
- String to Integer– parseInt()
- Split() String method
- Swap two Strings without using third variable
- Searching characters and substring in a String
- Compare two Strings in Java
- Java String toLowerCase()
- Reverse a string in Java (5 Different Ways)
- Remove Leading Zeros From String in Java
- Trim (Remove leading and trailing spaces) a string
- Counting number of lines, words, characters and paragraphs in a text file using Java
- String toString() Method in java with Examples
- StringBuffer deleteCharAt() Method in Java with Examples
- StringBuffer delete() Method in Java with Examples
- StringBuffer appendCodePoint() Method in Java with Examples
- StringBuffer replace() Method in Java with Examples
- StringBuffer reverse() Method in Java with Examples
- StringBuffer append() Method in Java with Examples
- Check if a string contains only alphabets in Java using Lambda expression
- Remove elements from a List that satisfy given predicate in Java
- Check if a string contains only alphabets in Java using ASCII values
- Check if a string contains only alphabets in Java using Regex
- Arrays in Java(Practice)
- Default Array values
- Compare two arrays
- Final arrays
- Jagged Array
- Array IndexOutofbounds Exception
- Array vs ArrayList in Java
- ArrayList to Array Conversion
- Custom ArrayList in Java
- Merge arrays into a new object array in Java
- Util Arrays Class (Contains utility functions for Arrays)
- Reflect Array class in Java
- util.Arrays vs reflect.Array in Java
- C++ vs Java
- Static keyword in C++ vs Java
- Exception Handling in C++ vs Java
- Inheritance in C++ vs Java
- Virtual behavior differ in C++ vs Java
- Foreach in C++ and Java
- C/C++ Pointers vs Java References
- Comparison of boolean data type in C++ and Java
- Floating Point Operations & Associativity in C, C++ and Java
- Methods
- Parameters passing
- Returning Multiple values
- Throwable fillInStackTrace() method in Java
- Valid variants of main()
- Variable Arguments (Varargs) method
- Method class isSynthetic() method in Java
- Method Overloading
- Different ways of Method Overloading in Java
- Method overloading and null error
- Method Overloading with Autoboxing and Widening
- Method Overloading and Ambiguity in Varargs
- Overloading main()
- Overriding equals method
- Overriding toString() method
- Private and final methods
- LongStream.Builder build() in Java
- DoubleStream.Builder build() in Java
- Stream.Builder accept() method in Java
- Stream.Builder add() method in Java
- IntStream.Builder add() method in Java
- IntStream.Builder build() in Java with Examples
- IntStream.Builder accept() method in Java
- DoubleStream.Builder add(double t) in Java with Examples
- DoubleStream.Builder accept() method in Java
- LongStream.Builder accept() method in Java
- LongStream.Builder add(long t) in Java
- Character.isSpaceChar() method in Java
- Java is Strictly Pass by Value
- Clone() method
- Remote Method Invocation
- Default Methods
- Long longValue() Method in Java
- Passing and Returning Objects in Java
- Character.offsetByCodePoints() in Java with Examples
- Character.offsetByCodePoints() Method in java
- Character.isUnicodeIdentifierPart() Method in Java with Examples
- Character.isSupplementaryCodePoint() Method in Java
- Date after() method in Java
- System.exit() method
- Short shortValue() Method in Java
- BigInteger signum() Method in Java
- BigInteger getLowestSetBit() Method in Java
- BigInteger abs() Method in Java
- BigInteger mod() Method in Java
- BigInteger toString() Method in Java
- BigInteger flipBit() Method in Java
- BigInteger clearBit() Method in Java
- BigInteger bitCount() Method in Java
- BigInteger setBit() Method in Java
- BigInteger bitLength() Method in Java
- BigInteger negate() Method in Java
- Method Class | equals() Method in Java
- BigInteger and() Method in Java
- BigInteger andNot() Method in Java
- BigInteger not() Method in Java
- BigInteger shiftLeft() Method in Java
- BigInteger shiftRight() Method in Java
- BigInteger testBit() Method in Java
- BigInteger signum() Method in Java
- Java 8 | BigInteger divideAndRemainder() method with Examples
- Java 8 | BigInteger longValueExact() Method with Examples
- Java 8 | BigInteger byteValueExact() method with Examples
- Java 8 | BigInteger shortValueExact() Method with Examples
- BigInteger intValueExact() Method in Java with Examples
- Method Class | getExceptionTypes() Method in Java
- Method Class | getTypeParameters() Method in Java
- Method Class | getGenericExceptionTypes() Method in Java
- Method Class | getGenericReturnType() Method in Java
- Method Class | getName() Method in Java
- Method Class | getParameterCount() method in Java
- Method Class | getAnnotation() method in Java
- Method Class | getModifiers() method in Java
- getParameterAnnotations() method in Java
- getAnnotatedReturnType() method in Java
- Method Class | getDeclaredAnnotations() method in Java
- Method Class | getDeclaringClass() method in Java
- Method Class | isVarArgs() Method in Java
- Method Class | hashCode() Method in Java
- Integer hashCode() Method in Java
- Integer decode() Method in Java
- Integer lowestOneBit() Method in Java
- Integer highestOneBit() Method in Java
- Integer shortValue() Method in Java
- Integer sum() Method in Java
- Integer rotateRight() Method in Java
- Integer rotateLeft() Method in Java
- Integer reverseBytes() Method in Java
- Integer intValue() Method in Java
- Integer reverse() Method In Java
- Integer floatValue() Method in Java
- Integer toOctalString() Method in Java
- Integer valueOf() Method in Java
- Integer toString() in Java
- Integer signum() Method in Java
- Long signum() Method in Java
- BigDecimal shortValueExact() Method in Java
- BigDecimal signum() Method in Java
- BigDecimal shortValueExact() Method in Java
- BigDecimal equals() Method in Java
- BigDecimal stripTrailingZeros() Method in Java
- BigDecimal toBigInteger() Method in Java
- BigDecimal compareTo() Function in Java
- BigDecimal toBigIntegerExact() Method in Java
- BigDecimal ulp() Method in Java
- BigDecimal unscaledValue() in Java
- BigDecimal byteValueExact() Method in Java
- BigDecimal valueOf() Method in Java
- BigDecimal longValue() Method in Java
- BigDecimal hashCode() Method in Java
- BigDecimal precision() Method in Java
- BigDecimal intValue() Method in Java
- BigDecimal longValueExact() Method in Java
- BigDecimal intvalueExact() Method in Java
- BigDecimal scale() Method in Java
- BigDecimal scaleByPowerOfTen() method in Java
- BigDecimal plus() method in Java
- BigDecimal multiply() Method in Java
- BigDecimal movePointRight() Method in Java
- BigDecimal movePointLeft() Method in Java
- BigDecimal min() Method in Java
- BigDecimal max() Method in Java
Clock
- Clock systemUTC() Method in Java with Examples
- Clock systemDefaultZone() Method in Java with Examples
- Clock tick() Method in Java with Examples
- Clock tickSeconds() method in Java with Examples
- Clock system() Method in Java with Examples
- Java Clock withZone() method in Java with Examples
- Java Clock tickMinutes() method in Java with Examples
- Java 8 Clock instant() method with Examples
- Java 8 Clock millis() Method with Examples
- Java 8 Clock equals() Method with Examples
- Java 8 Clock offset() method with Examples
- Java 8 Clock fixed() method with Examples
- Java 8 Clock getZone() method with Examples
- Java 8 Clock hashCode() method with Examples
- Java 8 Streams | Collectors.joining() method with Examples
- Java 8 | Collectors averagingInt() with Examples
- Java 8 | Collectors counting() with Examples
- | Collectors averagingLong (ToLongFunction mapper) with Examples
- | Collectors averagingDouble() with Examples
- Collectors toSet() in Java with Examples
- Java | Collectors maxBy(Comparator comparator) with Examples
- Java | Collectors minBy(Comparator comparator) with Examples
- Java Stream | Collectors toCollection() in Java
StrictMath
- Set 1Set 2
- StrictMath min() Method in Java with Examples
- StrictMath ceil() Method in Java with Examples
- StrictMath floor() Method in Java
- StrictMath exp() Method in Java
- StrictMath expm1() Method in Java With Examples
- StrictMath cbrt() Method in Java
- StrictMath cos() Method in Java with Examples
- StrictMath asin() Method in Java With Examples
- StrictMath acos() Method in Java
- StrictMath atan() Method in Java
- StrictMath cosh() Method in Java
- StrictMath getExponent() Method In Java
- StrictMath getExponent() Method In Java
- Exceptions
- OutOfMemoryError Exception
- 3 Different ways to print Exception messages in Java
- flow control in try-catch-finally
- Types of Exceptions
- Catching base and derived classes as exceptions
- Checked vs Unchecked Exceptions
- Throw and Throws
- User-defined Custom Exception
- Infinity or Exception?
- Multicatch
- Chained Exceptions
- Null Pointer Exception
- Output of Java program | Set 12(Exception Handling)
- Interfaces
- Access specifier for methods in interfaces
- Access specifiers for classes or interfaces
- Abstract Classes
- Difference between Abstract Class and Interface in Java
- Comparator Interface
- Java Interface methods
- Nested Interface
- Nested Classes in Java
- Inner class in java
- Local Inner Class in Java
- Anonymous Inner Class in Java
- Functional Interfaces
- What is a Marker interface
- Questions on Abstract Classes and Interfaces
- Output of Java program | Set 15 (Inner Classes)
- Static method in Interface in Java
- Function Interface in Java with Examples
- Java AbstractSequentialList | iterator() method
- Java AbstractSequentialList | add()
- Java AbstractSequentialList | ListIterator()
- SortedSet Interface
- NavigableSet Interface
- Deque interface
- SortedMap Interface
- NavigableMap Interface
- Queue Interface
- Java 8 | DoubleToIntFunction Interface in Java with Example
- Java 8 | IntToLongFunction Interface in Java with Examples
- Java 8 | IntToDoubleFunction Interface in Java with Examples
- Java 8 | DoubleToLongFunction Interface in Java with Examples
- PriorityQueue
- PriorityQueue spliterator() method in Java
- Queue element() method in Java
- Queue peek() method in Java
- Queue remove() method in Java
- Queue add() method in Java
- Queue offer() method in Java
- Deque offerLast() method in Java
- Deque contains() method in Java
- Deque add() method in Java
- Deque offer() method in Java
- Deque getLast() method in Java
- Deque getFirst() method in Java
- Deque element() method in Java
- Deque iterator() method in Java
- Deque descendingIterator() method in Java
- Deque descendingIterator() method in Java
- Deque addFirst() method in Java with Examples
- BiConsumer Interface in Java with Examples
- Consumer Interface in Java with Examples
- Java | BiFunction Interface methods – apply() and addThen()
- Collection:
- List:
- Queue:
- Deque:
- ArrayDeque
- java.util.Concurrent:
- Set:
- AbstractSet
- EnumSet
- HashSet
- TreeSet
- java.util.Concurrent:
- Implementations:
- Map:
- HashTable
- Stack
- Vector
- IntBuffer asReadOnlyBuffer() method in Java
- IntBuffer duplicate() method in Java with Examples
- IntBuffer compareTo() method in Java
- FloatBuffer equals() method in Java with Examples
- FloatBuffer put() methods in Java with Examples
- FloatBuffer get() methods in Java with Examples
- FloatBuffer wrap() method in Java with Examples
- FloatBuffer slice() method in Java with Examples
- FloatBuffer duplicate() method in Java with Examples
- FloatBuffer array() method in Java With Examples
- FloatBuffer arrayOffset() method in Java With Examples
- FloatBuffer hasArray() method in Java with Examples
- FloatBuffer asReadOnlyBuffer() method in Java with Examples
- FloatBuffer compareTo() method in Java With Examples
- FloatBuffer allocate() method in Java With Examples
- FloatBuffer compact() method in Java With Examples
- DoubleBuffer equals() method in Java with Examples
- DoubleBuffer slice() method in Java with Examples
- DoubleBuffer asReadOnlyBuffer() method in Java with Examples
- DoubleBuffer compact() method in Java With Examples
- DoubleBuffer allocate() method in Java With Examples
- DoubleBuffer duplicate() method in Java with Examples
- DoubleBuffer compareTo() method in Java With Examples
- DoubleBuffer wrap() method in Java with Examples
- DoubleBuffer hasArray() method in Java with Examples
- DoubleBuffer arrayOffset() method in Java With Examples
- DoubleBuffer array() method in Java With Examples
- DoubleBuffer put() methods in Java with Examples | Set 1
- ShortBuffer equals() method in Java with Examples
- ShortBuffer slice() method in Java with Examples
- ShortBuffer allocate() method in Java With Examples
- ShortBuffer toString() method in Java with Examples
- ShortBuffer order() Method in Java with Examples
- ByteBuffer asReadOnlyBuffer() method in Java with Examples
- ByteBuffer asLongBuffer() method in Java with Examples
- ByteBuffer asShortBuffer() method in Java with Examples
- ByteBuffer compareTo() method in Java With Examples
- ByteBuffer get() method in Java with Examples
- ByteBuffer compact() method in Java with Examples
- ByteBuffer duplicate() method in Java with Examples
- ByteBuffer arrayOffset() method in Java with Examples
- ByteBuffer equals() method in Java with Examples
- CharBuffer put() method in Java
- CharBuffer equals() method in Java
- CharBuffer allocate() method in Java with Examples
- SecureRandom nextBytes() method in Java with Examples
- SecureRandom setSeed() method in Java with Examples
- SecureRandom getSeed() method in Java with Examples
- SecureRandom getProvider() method in Java with Examples
- SecureRandom getAlgorithm() method in Java with Examples
- SecureRandom generateSeed() method in Java with Examples
- SecureRandom getInstance() method in Java with Examples
- KeyPairGenerator getAlgorithm() method in Java with Examples
- KeyFactory generatePrivate() method in Java with Examples
- KeyPairGenerator getProvider() method in Java with Examples
- KeyFactory generatePublic() method in Java with Examples
- KeyFactory getAlgorithm() method in Java with Examples
- KeyPairGenerator generateKeyPair() method in Java with Examples
- KeyPairGenerator genKeyPair() method in Java with Examples
- KeyPairGenerator getInstance() method in Java with Examples
- AlgorithmParameterGenerator generateParameters() method in Java with Examples
- AlgorithmParameterGenerator getAlgorithm() method in Java with Examples
- AlgorithmParameterGenerator getProvider() method in Java with Examples
- Java Signature initSign() method with Examples
- Java Signature getInstance() method with Examples
- Java Signature sign() method with Examples
- Java Signature toString() method with Examples
- Java Signature getProvider() method with Examples
- Java Signature getAlgorithm() method with Examples
- Provider values() method in Java with Examples
- Provider keySet() method in Java with Examples
- Provider keys() method in Java with Examples
- Provider getService() and getServices() method in Java
- Provider getProperty() method in Java with Examples
- Provider toString() method in Java with Examples
- Provider getVersion() method in Java with Examples
- Provider getName() method in Java with Examples
- Provider getInfo() method in Java with Examples
- Provider get() method in Java with Examples
- Provider entrySet() method in Java with Examples
- Provider elements() method in Java with Examples
- Function Interface in Java with Examples
- Multithreading
- Lifecycle and states of a thread
- Main thread
- Methods to prevent thread execution
- inter thread communication
- Java.lang.Thread class
- Start() function in multithreading
- Java Thread Priority
- Joining Threads in Java
- Naming a thread and fetching name of current thread in Java
- Synchronization
- Method and Block Synchronization
- Producer-Consumer solution
- Thread Pools in Java
- Semaphore in Java
- Java.util.concurrent.Semaphore class in Java
- CountDownLatch
- Deadlock in java
- Daemon thread
- Reentrant Lock
- Cyclic Barrier in Java
- Callable and Future in Java
- Runtime Class
- Output of Java program | Set 16 (Threads)
- File class
- Ways of Reading a text file in Java
- file permissions in java
- Moving a file from one directory to another using Java
- Copying file using FileStreams
- Delete a file using Java
- Java program to delete duplicate lines in text file
- Java program to merge two files alternatively into third file
- Java program to List all files in a directory and nested sub-directories | Recursive approach
- Java program to delete certain text from a file
- Check if a File is hidden in Java
- Redirecting System.out.println() output to a file
- Introduction
- Unit Class in JavaTuples
- Pair Class in JavaTuples
- Triplet Class in JavaTuples
- Quartet Class in JavaTuples
- Quintet Class in JavaTuples
- Sextet Class in JavaTuples
- Septet Class in JavaTuples
- Octet Class in JavaTuples
- Ennead Class in JavaTuples
- Decade Class in JavaTuples
- LabelValue Class in JavaTuples
- KeyValue Class in JavaTuples
- JavaTuple toList() method
- JavaTuples setAtX() method
- JavaTuples removeFromX() method
- JavaTuples hashcode() method
- JavaTuples setValue() method
- JavaTuple getValueX() method
- JavaTuples getValue() method
- JavaTuples setLabel() method
- JavaTuples getLabel() method
- JavaTuples setKey() method
- JavaTuples getKey() method
- JavaTuple lastIndexOf() method
- JavaTuples indexOf() method
- JavaTuple toArray() method
- JavaTuples toString() method
- JavaTuples contains() method
- JavaTuples containsAll() method
- JavaTuples getSize() method
- JavaTuples equal() method
- JavaTuples fromIterable() method
- JavaTuples add() method
- JavaTuples with() method
- JavaTuples addAtX() method
- JavaTuples fromCollection() method
- JavaTuples fromArray() method
- Implement Pair Class with Unit Class in Java using JavaTuples
- Implement Quartet Class with Triplet Class in Java using JavaTuples
- Implement Triplet Class with Pair Class in Java using JavaTuples
- Implement Decade Class from Ennead Class in Java using JavaTuples
- Implement Ennead Class from Octet Class in Java using JavaTuples
- Implement Septet Class from Sextet Class in Java using JavaTuples
- http://Implement Octet Class from Septet Class in Java using JavaTuples
- Implement Sextet Class from Quintet Class in Java using JavaTuples
- Implement Quintet Class with Quartet Class in Java using JavaTuples
Queue implemented classes :
- Set 1 (Read and Write)
- Set 2 (Get and Set Pixels)
- Set 3 (Colored image to greyscale image conversion)
- Set 4 (Colored image to Negative image conversion)
- Set 5 (Colored to Red Green Blue Image Conversion)
- Set 6 (Colored image to Sepia image conversion)
- Set 7 (Creating a random pixel image)
- Image Processing in Java | Set 8 (Creating mirror image)
- Set 9 ( Face Detection )
- Set 10 ( Watermarking an image )
- Set 11 (Changing orientation of image)
- Set 12 ( Contrast Enhancement )
- Set 13 (Brightness Enhancement)
- Set 14 ( Sharpness Enhancement )
- Set 14 ( Comparison of two images )
- Compressing and Decompressing files in Java




