Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
Unix command to find IP address from hostname - Linux example
How to find Files with Matching String in Linux? grep -l command Example
13 Java Serialization Interview Questions with Answers for 3 to 5 Years Experienced
10 Regular Expressions Every Java Programmer Should Learn
Difference between Set, List and Map in Java - Interview question
Difference between Heap and Stack Memory in Java? [Explained]
Top 80 Core Java Interview Questions with Answers
How does Hello world program in Java works? Example and Explanation
How to Create, Start, and Stop a New Thread in Java? [Example Tutorial]
How to use CountDownLatch in Java? Example
How to sort a List or Stream by Multiple Fields in Java? Comparator comparing() + thenComparing Example
One of the common requirements in Java is to compare objects by multiple fields. For example, if you have a list of CreditCard objects and you want to compare them by their provider and credit limit I mean, first compare them by their providers like VISA, Master, or American Express and if they are from the same provider then compare them by their credit limit, also known as breaking ties. Before Java 8 this wasn't easy because you have to write nested codes to compare multiple fields of an object as there was no easy way to chain multiple Comparators in Java, but things have changed a lot from Java 8.
How to use CompletableFuture in Java? Example Tutorial
How to get the value of a checkbox using jQuery ? Example Tutorial
Suppose you have a web page with a checkbox like a registration page where you have a checkbox about reading terms and conditions. When the user clicks the submit button, your job is to validate whether that particular checkbox is checked or not? How do you do that? How do you get the value of the checkbox to see if it's checked or not? Well, you can use a pseudo-selector ":checked" to see if that checkbox is checked or not. This selector returns true if the user has clicked and kept the checkbox checked; false otherwise. You can get the checkbox either by class or id and then you can call the is(":checked") method, as shown in our example.
How to convert an int to String in Java? 4 Examples Tutorial
How to use lifecycle methods in React? Example Tutorial
- Mounting
- Updating
- Unmounting
How to use String.matches() with Regular Expression in Java? Example Tutorial
The string matches method in Java can be used to test String against regular expressions in Java. The string matches() method is one of the most convenient ways of checking if a String matches a regular expression in Java or not. Quite often we need to write code that needs to check if String is numeric, Does String contains alphabets e.g. A to Z or a to Z, How to check if String contains a particular digit 6 times, etc. There are so many cases in Java programming where we need a regular expression.
How to prepare for Google Cloud Machine Learning Engineer Exam?
How to Prepare for Google Cloud Security Engineer Exam
The world is changing, so does the studying procedure. In today's world, everything is before us, any course, any certificate can be accomplished using a single gadget. But, maximum of us are deluded by assigning unmerited & boring courses, which lack in quality. In the path of this article, I'll be directing you to some splendiferous resources that would help you undoubtedly. To succeed in this target, I've vetted a tracing of tactics. In this plan, I've fractioned the sketch into three parts – accumulating wisdom via courses & books, and evaluating your gained wisdom into practice tests. Let's buckle down into the details of the Google Cloud Security Engineer Exam and analyze this exam, strategies, what it is to pass this exam.
How to use Switch Statement and Expression in Java? Tutorial with Examples
int value;
Now, suppose this int can have up to 5 values associated with it. Let’s say {0, 1, 2, 3, 4}.
For each value, we need to do different processing.
Understanding "Lifting State Up" in React - Example Tutorial
If you have ever worked with React, then you know the importance of state management. The state is managed within the component and decides the component’s behavior. But as the application grows, the state is required to be shared among the different components. For such global state sharing, third-party libraries such as Redux are used.
Apart from managing the state inside a component or using redux for the global state, there is one more way to work with the state. This is called “lifting state up”. In this article, we will discuss what is “lifting state up” in React with the help of an example.