Home » Java » Page 12

Java

Receive Pub/Sub messages to your Spring Application

spring-interview-questions-answers

Pub/Sub is a messaging solution provided by GCP Before we dive into the actual configuration we need to be aware that Spring Cloud for GCP is now managed by the Google Cloud Team. Therefore the latest code can be found here. Our application will receive messages from Pub/Sub and expose them using an endpoint.Let’s go for the imports first <?xml ...

Read More »

KivaKit applications

java-interview-questions-answers

The kivakit-application module contains building blocks for creating applications and servers. In the diagram below, we can see that the Application class extends BaseComponent. Server, in turn, extends Application. BaseComponent inherits Repeater functionality from BaseRepeater, and handy default methods from the Component interface. ComponentMixin (shown in the next diagram) also inherits these methods from Component. Application provides command-line parsing (see ...

Read More »

7 Best Games Written in Java

Among one of the most popular and well-known programming languages of the 21st century, Java is a household name. Created in 1995, the programming language prides itself on the mantra write once, run anywhere (WORA), making it incredibly useful in a world awash with different devices each running on differing architectures. While we’re all used to Java applications—from Spotify servers ...

Read More »

Testing Scenarios You Should Avoid While Automating With Selenium

Selenium is a widely used web automation testing platform, and Selenium Automation is in great demand today. There are plenty of real-time test scenarios in selenium testing where the need for Automation is justifiable. But, according to some testing experts, it is not always recommended to test all the test scenarios using Selenium. As a web automation tool, Selenium primarily ...

Read More »

Configuring plain Java projects using MicroProfile Config

java-interview-questions-answers

If you’re in the Enterprise Java space, you’re probably aware that you can use MicroProfile Config to configure your applications. This also works with plain Java projects, without an enterprise runtime, by using a MicroProfile implementation such as Smallrye. In this video, I’m showing how to do this, and in which circumstances it might be helpful: The example uses a ...

Read More »

A Comprehensive Guide On JUnit 5 Extensions

JUnit is one of the most popular unit testing frameworks in the Java ecosystem. The JUnit 5 version (also known as Jupiter) contains many exciting innovations, including support for new features in Java 8 and above. However, many developers still prefer to use the JUnit 4 framework since certain features like parallel execution with JUnit 5 are still in the ...

Read More »

TestNG vs. JUnit Testing Framework: Which One Is Better?

Introduction Software Development goes through many phases like requirement gathering & analysis, communication, design, code building, testing, and release. A business has to ensure that the product they deliver is up to the mark, which is possible when the product goes through multidimensional quality checks. Testing is an indispensable part of the SDLC and can be achieved either manually or ...

Read More »

Logging in Unit Tests, a Bad Practice

Logging is an inevitable part of debugging. Well, at least in modern high-level programming languages and architectures. It wasn’t thirty years ago, in Assembly, but it is now. Sometimes we trace variables, but rarely. More often we just print them to console. Moreover, we don’t just print them using println or whatever it is we have for console printing; instead, ...

Read More »

Overhead added by Garbage Collection Logging

Enabling Garbage collection logs on your application has certain advantages. In nutshell, Garbage collection logs will facilitate you to optimize Garbage Collection pause time, improve overall application’s response time, forecast production outages, reduce computing cost. Even though Garbage collection logs have these advantages, we weren’t sure what overhead does garbage collection logging add to the application. Thus we set out ...

Read More »