Samual Sam has Published 2310 Articles

Java Program to check whether the entered value is ASCII 7 bit alphabetic

Samual Sam

Samual Sam

Updated on 15-Nov-2024 18:42:19

170 Views

In this article, we will discover how we can check whether a value entered is an ASCII 7-bit alphabetic character in Java. This process involves whether a character belongs to the ranges 'a' to 'z' or 'A' to 'Z' in the ASCII table. The character can be checked with some ... Read More

Java program to display sub-list of ArrayList

Samual Sam

Samual Sam

Updated on 14-Nov-2024 17:38:11

122 Views

In this article, we will learn how to print a sublist of an ArrayList in Java using the subList() method. The ArrayList class in Java provides a dynamic array for storing elements. The subList() method returns a portion of the list based on specified indices. Problem StatementGiven an ArrayList ... Read More

Java program to check whether the entered value is ASCII 7-bit alphabetic lowercase

Samual Sam

Samual Sam

Updated on 13-Nov-2024 17:18:11

195 Views

In this article, we'll learn how to check whether the entered value is ASCII 7-bit alphabetic lowercase in Java. In ASCII, the lowercase alphabets begin with the character ‘a’ and end with ‘z’. We will write a program checking whether a character is a lowercase alphabetic character using a ... Read More

Java program to create big decimal values via a string

Samual Sam

Samual Sam

Updated on 13-Nov-2024 17:17:20

147 Views

In this article, we will learn how to create BigDecimal values in Java using strings. The BigDecimal class provides a way to handle large or precise numbers, making it useful for high-precision arithmetic. By creating BigDecimal objects from strings, we make sure that the exact number is represented without any ... Read More

What does “dereferencing” a pointer mean in C/C++?

Samual Sam

Samual Sam

Updated on 08-Nov-2024 16:56:54

22K+ Views

Dereferencing is used to access or manipulate data contained in memory location pointed to by a pointer. *(asterisk) is used with pointer variable when dereferencing the pointer variable, it refers to variable being pointed, so this is called dereferencing of pointers. int main() {  int a = 7, b ; ... Read More

Java 8 clock offset() method

Samual Sam

Samual Sam

Updated on 07-Nov-2024 17:48:09

180 Views

In this article, we will learn how to use the Clock.fixed() method in Java to obtain a fixed instant on the clock. This method, part of the java.time package is primarily used for testing purposes. It requires two parameters: a fixed Instant and a ZoneId (time zone). The Clock.fixed() method ... Read More

Java 8 clock instant() method

Samual Sam

Samual Sam

Updated on 07-Nov-2024 17:47:55

238 Views

In this article, we will learn how to use the instant() method in the Clock class in Java to obtain the current instant of a clock object. This method requires no parameters and returns an Instance representing the current timestamp of the clock. The Instant class is a part of the ... Read More

Java program to display hour and minute in AM or PM

Samual Sam

Samual Sam

Updated on 07-Nov-2024 01:06:05

516 Views

In this article, we will learn how to format date and time in Java using the Formatter and Calendar classes. The Formatter class allows for flexible string formatting, and the Calendar class is useful for retrieving and manipulating date and time values. We will use these classes to display the ... Read More

Java program to subtract week from current date

Samual Sam

Samual Sam

Updated on 04-Nov-2024 18:44:16

861 Views

In this article, we will learn to subtract the week from the current date using Java. This is useful when you need to manipulate dates, such as calculating dates from previous weeks for scheduling or tracking purposes. We'll use two approaches: using the Calendar class and the LocalDate class, showcasing ... Read More

Java NumberFormat.getInstance() method

Samual Sam

Samual Sam

Updated on 04-Nov-2024 18:41:47

558 Views

In this article, we will learn how to format numbers in Java using the NumberFormat class from the java.text package. The NumberFormat class provides methods for formatting numbers based on Locale settings, which is useful for creating internationalized Java applications. Using the NumberFormat.getInstance() method, we can format double, ... Read More

Advertisements