Java2Blog
  • Home
  • Core Java
  • Tutorials
    • Spring
    • Spring Boot
    • Spring MVC
    • Java 8
    • Hibernate
  • Categories
    • Interview Questions
    • Spring Frameworks
    • Core java
    • Python
    • C++
  • NM
close
import_contacts

Java Tutorials

  • Core Java
  • Java Interview questions
  • Java 8 Stream
  • Java interview programs
import_contacts

Data structure and algorithm

  • Data structure in java
  • Data structure interview questions
import_contacts

Spring tutorials

  • Spring tutorial
  • Spring boot tutorial
  • Spring MVC tutorial
  • Spring interview questions

Core java

  • Core Java interview Exception Handling
    14 July

    Difference between checked and unchecked exception in java

    In this post, we will see difference between checked and unchecked exception in java. It is important question regarding exceptional handling. What is Exception? Exception is unwanted situation or condition while execution of the program. If you do not handle exception correctly, it may cause program to terminate abnormally. What is checked exception? Checked exceptions […]

    Read More
  • Core Java interview String
    13 July

    Difference between StringBuffer and StringBuilder in java

    In this post, we will see difference between StringBuffer and StringBuilder in java StringBuffer vs StringBuilder Parameter StringBuffer StringBuilder Thread-safe StringBuffer is thread safe. Two threads can not call methods of StringBuffer simultaneously. StringBuilder is not thread safe, so two threads can call methods of StringBuilder simultaneously. Performance It is less performance efficient as it […]

    Read More
  • Difference between CountDownLatch and CyclicBarrier
    Concurrent APIs Multithreading Core Java interview Interview
    11 July

    Difference between CountDownLatch and CyclicBarrier in java

    In this post, we will see difference between CountDownLatch and CyclicBarrier in java. Lets first see similarities among them. Both wait for specific number of threads or tasks to finish. Lets see differences between CountDownLatch and CyclicBarrier. CountDownLatch vs CyclicBarrier Parameter CountDownLatch CyclicBarrier Reuse It can not be reused once count reaches 0 It can […]

    Read More
  • Core Java interview Exception Handling
    19 June

    Can We Have Try without Catch Block in Java

    In Java, it’s possible to use a try block without a catch block, but it must be followed either by a finally block or be part of a try-with-resources statement. Let’s see both cases with the help of examples: 1. try-finally Structure You can use a try block with a finally block. As you may […]

    Read More
  • Core Java interview Multithreading
    07 June

    Daemon thread in java with example

    Daemon threads are low priority background threads which provide services to user threads. It’s life depends on user threads. If no user thread is running then JVM can exit even if daemon threads are running. JVM do not wait for daemon threads to finish. Daemon threads perform background tasks such as garbage collection, finalizer  etc. […]

    Read More
  • String
    03 June

    How to remove non-ascii characters from a string in java

    In this post, we will see how to remove non ascii character from a string in java. Sometimes, you get non-ascii characters in String and you need to remove them. We will use regular expressions to do it. Java program to remove non-ascii characters: [crayon-68a0c4cb0b847889163010/] When you run above program, you will get below output: […]

    Read More
  • HashMap Java Collections
    03 June

    Convert HashMap to ArrayList in java

    In this post, we will see how to convert HashMap to ArrayList in java. Many times, you need to store keys or values into ArrayList or Store HashMap’s Node objects in ArrayList. HashMap and ArrayList both are the most used data structure in java and both have different Hierarchy. Here are the ways to convert […]

    Read More
  • Core Java interview java programs String
    03 June

    How to check if String has all unique characters in java

    Learn about how to check if String has all unique characters in java

    Read More
  • Java Collections
    30 May

    Java ArrayList indexOf example

    ArrayList‘s indexOf method is used to find out first index of object in arraylist. indexOf method takes object as argument and returns first occurrence of specified element. Methods: public int indexOf(Object o) returns index of first occurrence of element in the ArrayList. indexOf method return -1 if object is not present in the ArrayList ArrayList […]

    Read More
  • keyboard_arrow_left Previous
  • 1
  • …
  • 53
  • 54
  • 55
  • 56
  • 57
  • …
  • 70
  • Nextkeyboard_arrow_right

Newsletter


Let’s be Friends

  • Facebook
  • Twitter
  • LinkedIn

© 2020-22 Java2Blog Privacy Policy