Though both Hashtable and HashMap are data-structure based upon hashing and implementation of Map interface, the main difference between them is that HashMap is not thread-safe but Hashtable is thread-safe. This means you cannot use HashMap in a multi-threaded Java application without external synchronization. Another difference is HashMap allows one null key and null values but Hashtable doesn't allow null key or values. Also, the thread-safety of the hash table is achieved using internal synchronization, which makes it slower than HashMap.
Saturday, May 27, 2023
What is difference between HashMap and Hashtable in Java?
Though both Hashtable and HashMap are data-structure based upon hashing and implementation of Map interface, the main difference between them is that HashMap is not thread-safe but Hashtable is thread-safe. This means you cannot use HashMap in a multi-threaded Java application without external synchronization. Another difference is HashMap allows one null key and null values but Hashtable doesn't allow null key or values. Also, the thread-safety of the hash table is achieved using internal synchronization, which makes it slower than HashMap.
Difference between List and Set in Java Collection? Example
Friday, May 26, 2023
Difference between Wait and Sleep, Yield in Java? Example
What is Timer and TimerTask in Java – Tutorial Example
Difference between Thread vs Runnable interface in Java
What is Daemon thread in Java and Difference to Non daemon thread - Tutorial Example
4 Reasons and Benefits of Using Multithreading in Java? Why Threads?
How to use Fork Join in Java Multithreading - Tutorial with Example
Difference between Process and Thread in Java - Example
How to use Exchanger for Inter thread communication in Java? Example Tutorial
What is Phaser in Java? When and How to use Phaser? Example Tutorial
Thursday, May 25, 2023
Difference between final, finally and finalize method in Java
Difference between private, protected, public and package modifier or keyword in Java
Difference between ArrayList and Vector in Java
Difference between TreeSet, LinkedHashSet and HashSet in Java with Example
Difference between static vs non static method in Java - Example
Difference between Class and Object in Java and OOP with Example
Difference between Abstract Class vs Interface in Java
Difference between valueOf and parseInt method in Java? Example
What is difference between java.sql.Time, java.sql.Timestamp and java.sql.Date - JDBC interview Question
What happens when you call Thread.run() instead of Thread.start() in Java? Trick Interview Question
Wednesday, May 24, 2023
Review - Is Introduction To Programming the Internet of Things (IoT) Specialization on Coursera worth it?
How to check File Permission in Java with Example - Java IO Tutorial
How to Change File Permissions in Java – Example Tutorial
Java Serialization Example - How to Serialize and Deserialize Objects in Java?Tutorial
SimpleDateFormat in Java is not Thread-Safe Use Carefully
Java 8 Comparator comparing() and thenComparing() Example - Tutorial
How to check if a File is hidden in Java? Example
How to create a hidden file in Java- Example Tutorial
Difference between Linked List and Array in Java? Example
Tuesday, May 23, 2023
How to merge two sorted arrays in Java? Example Tutorial
How to implement Strategy Design Pattern in Java? (with Real World Example, Pros and Cons)
Java 8 Predicate Functional Interface Example [Tutorial]
5 Ways to convert int to String in Java - Example Tutorial
Difference between @Autowired and @Qualifier Annotation in Spring Framework? Example Tutorial
How to do Pagination in Oracle Database - SQL Query With Example
How to Remove Leading/Trailing White Space from a String in SQL Server? LTRIM, RTRIM Example
Top 30 Examples of MySQL Commands in Linux and UNIX
Difference between Truncate and Delete in SQL? Example
Monday, May 22, 2023
Difference between Clustered Index and Non Clustered Index in SQL - Example
Difference between Primary key vs Foreign key in table – SQL Tutorial Example
Database Website to Run and Practice SQL Query Online for FREE - SQLFiddle
What is Referential Integrity in Database or SQL - MySQL Example Tutorial
Difference between SQL, T-SQL and PL/SQL?
Difference between IsNull and Coalesce in Microsoft SQL Server (with Examples)
Difference between close and deallocate cursor in SQL
3 Ways to Remove Duplicates from a table in SQL - Query Example
Top 25 DevOps Interview Questions and Answers for Experienced Developers
Hello guys, if you re preparing for DevOps Engineer interviews and looking for frequently asked DevOps Interview questions then you have come to the right place. Earlier, I have shared the DevOps RoadMap, best DevOps Courses, and DevOps books and in this article, I will share the frequently asked DevOps Interview Questions and their Answers. But, before we get to the most frequently asked DevOps interview questions, let me tell you what DevOps actually is. DevOps is basically a way of thinking or a collective approach to all the tasks that a company's application development and IT operation teams perform but it has taken the IT software development world by storm.
How to use useDispatch and useSelector? React Hooks Example Tutorial
Hello guys, if you are learning about React hooks and wondering how to use useDispatch and useSelector hooks in React application then you have come to the right place. Earlier,, I have shared the best React courses, websites, and books and in this article, I am going to show you how React hooks make coding and statement management easier than it was before. The introduction of React hooks changed a lot in the react application development. Developers moved from complicated and length class-based components to simpler functional components that can do the same work in fewer lines of code.
Sunday, May 21, 2023
Top 20 JSON Interview Questions with Answers for Beginners and Experienced Developers
Hello guys, if you are doing for a web developer interview or a Java web developer interview where you need to write server side application or backend code which uses HTTP to send and receive data then you should prepare about JSON. It's one of the most popular way to exchange data between two systems or between frontend and backend, client and server and most of the top programming language has API to create and parse JSON like Java has Jackson and JavaScript can by default support JSON because its nothing but JavaScript Object Notation. JSON is also the default data format for REST API and even GraphQL uses JSON to send request and receive response.
Top 10 Free Online Tools to View and Validate JSON for Java and Web Developers
How to iterate over JSONObject in Java to print all key values? Example Tutorial
Top 35 React.js Interview Questions Answers for Fullstack Java Developers
What is state in React.js? useState Hook Example Tutorial
Hello guys, I have just started a new series, React for Java developers and I am going to publish React tutorials and examples to teach React.js, one of the most popular frontend libraries to Java developers. Since most full-stack Java development is happening on React and Spring Boot, it makes sense for Java developers to learn React.js. In the past, I have also shared both best React courses and books, as well as The React Developer RoadMap, which provides all the tools, libraries, and resources you need to become a proficient React Developer.
Difference between var, let, and const in JavaScript? Example Tutorial
How to use props in React.js? Functional and Class Component + Properties Example Tutorial
React.js useState, useEffect and useDispatch Hooks Example - Tutorial
Student Management System Project - FullStack Java + Spring Boot + React.js Example Tutorial
Hello Java programmers, if you want to learn Spring Boot and Reactjs and looking for a full-stack Java example or a mini project then you have come to the right place. Earlier, I have shared the best Spring Boot courses, books, and best reactjs courses as well as many courses to learn full-stack development in Java and become a full-stack java developer. In this mini project, you will learn how to create an application that is capable of creating, deleting, updating, and retrieving functions using the Spring Boot, React, and H2 Database. In this tutorial you will create a School Classroom Application that can insert, update, delete and search students. The frontend of the application is developed using Reactjs and also the backend is developed using spring boot. And, most importantly communication between the two platforms will be done using the REST APIs.
Friday, May 19, 2023
Udemy Course Review - Is Modern HTML & CSS From The Beginning Worth it?
Hello guys, if you want to learn HTML and CSS from scratch and in depth and looking for best resources like online courses, books, tutorials, and websites then you have come to the right place. In the past, I have shared both best paid HTML courses as well as best free HTML and CSS courses and in this article, we are going to review one of the best Udemy course to learn HTML and CSS, The Modern HTML & CSS From the Beginning by none other than Brad Traversy. The websites contain two things: the front-end code, which is what you see on the screen, and the back-end code, which happens inside the website, like making an account or searching. There are many front-end languages you need to learn to make a stunning website, but HTML and CSS are the first and easy choices for any developer to learn, and this course will help you master them.
How to return JSON, XML or Thymeleaf Views from Spring MVC Controller? Example Tutorial
Top 5 Spring MVC Annotations for RESTful Web Services in Java
How to test a Spring Boot Application using JUnit, Mockito, and @SpringBootTest? Example Tutorial
What is @SpringBootTest Annotation in Java and Spring? How to use it? Example Tutorial
Spring Data JPA @Query Example - Tutorial
How to validate HTTP POST Request Payload on Spring MVC controller? Example Tutorial
Thursday, May 18, 2023
How to fix "java.lang.SecurityException: Missing required Permissions manifest attribute in main jar" [Solved]
1) Block all self-signed and unsigned Java applications and Applets if you have opted for HIGH security in Java Control Panel, which is also the default one.
2) Require a "Permission" attribute for a High-security setting
3) Warning users of missing permission attributes for the medium security settings.
How to deal with Java.rmi.MarshalException: CORBA MARSHAL in Java? Solution
How to fix java.io.IOException: Map failed and java.lang.OutOfMemoryError: Map failed? Example
java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:888)
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:885)
... 6 more
How to fix "No Property Found for Type class " Exception in Spring Data JPA [Solved]
[Solved] How to fix VirtualBox - /sbin/mount.vboxsf: mounting failed with the error: Protocol error
How to fix Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory in Java
How to fix invalid target release: 1.7, 1.8, 1.9, or 1.10 Error in Maven Build? Solution
How to Fix NullPointerException due to Space in HQL named queries in Hibernate? Example
How to Fix java.lang.UnsatisfiedLinkError: lwjgl64.dll : Access Denied Error? Minecraft Solution
How to Fix java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer? Example
How to fix java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer? [Solution]
Anyway, java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer comes when you are trying to use Jersey but have not added required dependency on your classpath e.g. those JAR files which contain the class "com.sun.jersey.spi.container.servlet.ServletContainer".