Author name: Ramesh Fadatare

Java interface Keyword

The interface keyword in Java is used to declare an interface. An interface is a reference type, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types. Interfaces cannot contain instance fields or constructors. They are a way to achieve abstraction and multiple inheritance in Java.

Java yield Keyword

The yield keyword in Java is used in the context of switch expressions, introduced in Java 12 as a preview feature and made a standard feature in Java 14. The yield keyword allows returning a value from a case block within a switch expression.

Java String Methods Cheat Sheet

Introduction Java’s String class provides a comprehensive set of methods for string manipulation, comparison, searching, and more. Understanding these methods is crucial for effective string handling in Java applications. This cheat sheet lists all the String methods available in Java SE 22, providing a brief description, examples, and explanations. Java String Methods Cheat Sheet Method …

Java String Methods Cheat Sheet Read More »

Scroll to Top