Skip to content
sneppets

sneppets

  • Privacy
check if string is not empty and not null

Java program to check if string is not empty and not null

May 26, 2019December 30, 2023 Editorial StaffLeave a Comment on Java program to check if string is not empty and not null

In this sneppet you will learn how to check if string is not empty and not null in Java. Note, a String with just whitespace is not considered as empty in Java. The following are the ways to test whether… Read More!

Java java, String

Use Abstraction to Simplify Design – Java Best Practices

March 17, 2019 Editorial StaffLeave a Comment on Use Abstraction to Simplify Design – Java Best Practices

In Java abstraction is accomplished by using Abstract class and Interfaces. Abstraction is one of the most important concept of OOPs. Abstract class is similar to Interfaces in Java, except that it can contain methods with implementations also. Abstract Class… Read More!

Best Practices, Java abstraction, java abstraction

java.util AbstractCollection with Examples

December 18, 2018 Editorial StaffLeave a Comment on java.util AbstractCollection with Examples

AbstractCollection is an abstract class that extends Object and implements Collection interface. This class provides a skeletal implementation of the Collection interface, to minimize the effort required to implement this interface. This is a member of the Java Collections Framework.… Read More!

Collections, Java, util AbstractCollection, java.util

Java Enumeration Interface and Vector Example

December 17, 2018 Editorial StaffLeave a Comment on Java Enumeration Interface and Vector Example

Enumeration interface is part of java.util package. An object that implements this interface generates a series of elements, one at a time. Successive calls to the nextElement() method return successive elements of the series. Enumeration Interface Java SE public interface… Read More!

Java, util Enumeration, HashTable, Vector
map interface

Java Map Interface, Implementations and Example

December 16, 2018December 16, 2018 Editorial StaffLeave a Comment on Java Map Interface, Implementations and Example

A Map interface is an object that maps keys to values or handles key-value pairs. It cannot contain duplicate keys and each key can map to at most one value. Map interface hierarchy The Map interface Java SE The methods… Read More!

Collections, Java HashMap, map, map interface, NavigableMap, SortedMap

Posts navigation

Older posts
Newer posts
Copyright © 2018 Sneppets. All Rights Reserved