In this tutorial, we’ll learn how to use the H2 in-memory database with Spring Boot. Spring Boot support H2 just like any other database. H2 is the open-source Java SQL database. Which is mainly used for testing or POC purposes. Spring boot provides out of the box support for H2 and you don’t need to… Continue reading
Searched for ""
Java for loop
Java for loop and enhanced for loop is a type of control flow statement which provides a compact way to iterate over a range of values. for loop repeatedly loops through the code until a particular condition is satisfied. Over the period, Java has added different types of for loop. for loop Enhanced for loop… Continue reading
Switch case statement in Java
A switch statement is a conditional statement that tests against multiple cases and displays one or multiple outputs based on the matching circumstances. Unlike if-then and if-then-else statements, the switch statement can work with byte, short, char, and int primitive data types. It also works with enum types (discussed in Java Enum), the String class, and a few wrapper classes: Character, Byte, Short, and Integer. Important Rules Only constants or literals are allowed in case Duplicate… Continue reading
Data types in Java
Java is a statically-typed language, which means that all variables must first be declared before they can be used. It means the variable’s name and types must be defined before it can be used in code. boolean bool = true; By writing the above line we are telling the program that a variable named bool… Continue reading
Java method parameter and argument
In this article, we will talk about the method parameter and method argument. Please make a note that the method argument and method parameter are sometimes used interchangeably. Parameters refer to the list of variables in a method declaration. Arguments are the actual values that are passed in when the method is invoked. When you invoke a method, the… Continue reading
15. Form input bindings
Welcome to a binding discussion! Now that we know all about this superstar, v-model, which is used to achieve two-way data binding on form elements, let’s visually understand how Vue works magically under the hood by picking the correct way to update a particular HTML element based on whether it is a radio button or a… Continue reading
10l. Advanced WebDriver – Using Log4j Part 2
This is a continuation of the article, ‘Using Log4j Part 1’ and hence, I suggest that you read part 1 before proceeding any further to get a grip on what’s happening. Scenario Configure Log4j.properties file, Log level – DEBUG Loggers – rootLogger and SeleniumTestLogger Appender – RollingFileAppender Layout – PatternLayout Write a JUnit4 test case, ‘Log4jTest.java’,… Continue reading
10k. Advanced WebDriver – Using Log4j Part 1
Let me take a stab at explaining logging for Selenium with Apache Log4j today! So, without further ado, let’s dive in!! Why do we need logging in the first place? As an automation tester, we deal with troubleshooting, debugging and so on. Logging makes this entire process so much easier! It gives us these magical… Continue reading
Java 8 Functional Interfaces
Introduction to functional interfaces A functional interface is an interface that has a single abstract method. Functional interfaces can have multiple static and default methods, but they should have only one abstract method to qualify as a functional interface. Functional interfaces were introduced in Java 8 in order to implement lambda expressions.
18. Class bindings
Welcome to yet another binding discussion. Today, I will be schooling you on class bindings. In other words, we will be playing around with HTML element’s class attribute by binding data to it using Vue. Why? Because we might be required to often manipulate the class list of an element. Just like any other data binding,… Continue reading