Wednesday, November 30, 2022

How to Perform Right-Click using Java in Selenium?

While automating a website for testing there is always required to perform some right-click or other user actions on the page.  These user actions are one of the most commonly used actions during automation, so selenium provides a way to perform these user actions by the Actions class.How...

Monday, November 28, 2022

Java Modules – Service Interface Module

Service Provider Interface, a feature of Java 6, makes it possible to find and load implementations that adhere to a specified interface. In this article, we’ll introduce Java SPI’s components and demonstrate how to use it in a real-world scenario. a well-known collection of programming classes and interfaces...

Wednesday, November 23, 2022

Quiz yourself: If/else statements, boolean operations, and side effects

Say what? Pay attention to the details if you want to find the right answer to this exam quiz.Given the NineOneOne classpublic class NineOneOne {    static boolean emergency;    public static void main(String[] args) {        if (!emergency());            say1(); //...

Monday, November 21, 2022

What to expect on the new Java SE 17 developer certification exam

You have 90 minutes to answer 50 questions. Ready. Set. Go!Oracle University’s Java SE 17 Developer 1Z0-829 exam has been officially released. It’s time to start thinking about taking this certification exam, which means it’s time to start studying.Many people ask why someone would bother to take a...

Friday, November 18, 2022

Build smarter Java types with records and enums

Take a functional approach to Java type design using Java’s new record keyword to guarantee that each constructed object is a legal value.A type defines a set of values. Historically developers haven’t been very good at using encapsulation to ensure that objects stay within a type’s set of...

Wednesday, November 16, 2022

Quiz yourself: Classes, modules, and sealed types

Know what Java Language Specification 8.1.6 says about sealed-type hierarchies.Read More: Oracle Java SE Programmer I Exam: Preparation Tips & Relevant 1Z0-808 Practice TestsGiven three classes that successfully compilepackage com.foo;public sealed class Super permits com.bar.SubBar, com.baz.SubBaz {}package com.bar;import com.foo.Super;public final class SubBar extends Super {}package com.baz;import com.foo.Super;public final class...

Monday, November 14, 2022

Oracle Java SE Programmer I Exam: Preparation Tips & Relevant 1Z0-808 Practice Tests

OCA is the acronym for Oracle Certified Associate and is the first certification you can get as a Java developer to demonstrate a solid knowledge of Java. Oracle offers many certificates related to Java, and Oracle Certified Associate, 1Z0-808 Java SE 8 Programmer I, is one such certification.This...

Quiz yourself: The truth about Java enums

Two of these statements are correct. Three are incorrect. Do you know the details?Which statements about enums are correct? Choose two.A. You cannot declare a final method in the enum type. B. You can declare an abstract method in the enum type. C. enum instances are immutable. D. You can...

Friday, November 11, 2022

Curly Braces #6: Recursion and tail-call optimization

Some Java developers use recursion, but many prefer loops. Why is that?Over the years, I’ve come to appreciate the power of recursion, yet I have two minor gripes with it.First, there is one part of every recursive call that jumps out at me as inelegant: the base case,...

Pages (26)1234567 »