Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
QuickSort Algorithm Example in Java using Recursion - Tutorial
How to remove a number from an Integer Array in Java? [Example Tutorial]
3 ways to sort a List in Java 8 and 11 - Example Tutorial
There are multiple ways to sort a list in Java 8, for example, you can get a stream from the List and then use the sorted() method of Stream class to sort a list like ArrayList, LinkedList, or Vector and then convert back it to List. Alternatively, you can use the Collections.sort() method to sort the list. There is also a sort() method added to the List class itself. The Collections.sort() method is an older one and it's available from JDK 1.0 itself but List.sort() is a new method added in Java 8. This method accepts a Comparator if you want to sort a List in a custom order, otherwise, you can pass null if you want to sort a List on the natural order of their elements.
5 Free SQL Books For Beginners and Experienced - Download PDF or Read Online
How Binary Search Algorithm Works? Java Example without Recursion
How to solve java.lang.NoClassDefFoundError: org/springframework/beans/factory/SmartInitializingSingleton in Spring Boot [Solved]
I was trying to run a HelloWorld program using Spring Boot when I got this error:
Exception in thread "main" java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:52)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:174)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:136)
10 Examples to DateTimeFormatter in Java 8 to Parse, Format LocalDate and LocalTime
How to declare and Initialize two dimensional Array in Java with Example
Difference between first level and second level cache in Hibernate
Difference between IN, OUT, and INOUT parameters in JDBC Stored Procedure? Answer
Hello guys, Java Database Connectivity, the JDBC API supports three types of parameters, I mean, IN, OUT, and INOUT. They are used to bind values into SQL statements. An IN parameter is the one whose value is unknown when the SQL statement is created and you bind values using various setXXX() method depending upon the type of column those IN parameter refers in SQL query. For example in SQL query, SELECT * from EMPLOYEE where EMP_ID=? if the EMP_ID is a VARCHAR column then you must call the setString() method to pass the value to the IN parameter.
How to create a custom tag in JSP? Steps and Example
You can create a custom tag in JSP either by implementing the SimpleTag interface or extending SimpleTagSupport class. Custom tags are introduced in JSP 2.0 in an effort to minimize Java code from JSP to keep them maintainable and allow page authors to work more in HTML or XML, like environment than writing Java codes. SimpleTag and SimpleTagSupport allow you to create a custom tag in JSP. It's easier to start with SimpleTagSupport class because it implements all methods of the SimpleTagSupport interface and if you are writing a basic tag then you just need to override the doTag() method of this class.
How to use lifecycle methods in functional components in React.js? useEffect() hook Example Tutorial
Hello guys, if you have been following my blogs then you know that I have launched a new series - React for Java developers and this is the 4th article on the series. Earlier, we have seen state management in React, Redux, and useState hooks example, and in this article, you will learn about how to use lifecycle methods in functional React components. Lifecycle methods are powerful features provided by React.js in the class-based components. Each of the lifecycle methods executes at a particular time during the lifecycle of a component.