Topics
Java
About this topic: Articles tagged __TAG__
Showing 1127 articlesRelated tags
Topics
Articles
Showing 1127 articles
How-tos
How to Convert String to Timestamp in Java
It shows four methods to convert a string to a timestamp in Java
↗
How-tos
How to Convert Boolean to String in Java
This tutorial teaches how to convert a boolean value to a string in Java. Explore various methods including String.valueOf(), Boolean.toString(), string concatenation, and …
↗
How-tos
How to Convert Double to Int in Java
Learn when to cast a double to int, use Math.round(), or call Double.intValue() in Java.
↗
How-tos
How to Add an Element to a Java Array
Learn why Java arrays have no built-in push() method and how to add values with a stack, list, or array copy.
↗
How-tos
How to Create Image Icons in Java
This tutorial demonstrates how to create image icons in Java.
↗
How-tos
How to Fix the Unexpected Type Error in Java
Fix Java's unexpected type compiler error by assigning to a variable instead of a method result such as charAt(i). See the required: variable / found: value clue and two …
↗
How-tos
How to Fix Java.Lang.StringIndexOutOfBoundsException: String Index Out of Range
Learn why charAt(0) fails on an empty Java string, how to check string index bounds, and when try-catch can help.
↗
How-tos
Java - Use NotNull Annotation in Method Argument
Learn how to write @NotNull on a Java method argument and what the annotation communicates. The declaration expresses a non-null contract; a separate configured mechanism is needed …
↗
How-tos
RuntimeException in Java: Meaning, Examples, and Checked Exceptions
Learn what java.lang.RuntimeException means in Java, see common causes, and compare unchecked runtime exceptions with checked exceptions.
↗
How-tos
How to Check an Object’s Runtime Type in Java
Use getClass(), getSimpleName(), and getTypeName() to inspect an object’s runtime class in Java.
↗
How-tos
The assert Keyword in Java
Learn when and how to use Java assertions, enable them with -ea, and apply them to internal assumptions.
↗
How-tos
The Difference Between `!=` and `=!` in Java
Learn how Java's `!=` comparison differs from assigning a negated boolean with `a = !b`.
↗
How-tos
How to Solve Divide by Zero Exception in Java
Learn why Java integer division by zero throws ArithmeticException while floating-point division follows IEEE 754, producing Infinity or NaN, and how to handle both safely.
↗
How-tos
How to Fix Java.Net.SocketTimeoutException: Read Timed Out Under Tomcat
This tutorial explores how to fix the java.net.SocketTimeoutException: Read timed out error under Tomcat in Java. Learn about the causes and solutions, including increasing timeout …
↗
How-tos
How to Change Java Version in Eclipse
This article teaches us to change the Java version for the current project in Eclipse.
↗
How-tos
How to Get a Thread ID in Java
Learn how to get a Java thread ID with `Thread.getId()` and identify the worker running an executor task with `Thread.currentThread().getId()`.
↗
How-tos
How to Replace Multiple Characters in String in Java
This article explains replaceAll, replace, and replaceFirst methods that can be used to replace multiple characters in a string.
↗
How-tos
Integer Division in Java
This article introduces integer division in Java, explaining how it works, common pitfalls, and methods to achieve precise results. Learn about integer division, modulus operator, …
↗
How-tos
How to Initialize All Array Elements to Zero in Java
This article discusses the methods you can do to initialize all array elements to zero in Java.
↗
How-tos
Get an Object's Runtime Class in Java
Learn how Java's getClass() method returns an object's runtime class, and how to use it with wrapper objects.
↗
How-tos
How to Represent Empty Char in Java
This article introduces how to handle empty char in Java.
↗
How-tos
Enqueue and Dequeue in Java
Learn how to enqueue and dequeue Java Queue elements, choose the right methods, and use LinkedList.
↗
How-tos
console.log in Java
This article introduces console.log in Java, exploring various methods for logging messages to the console. Learn how to use System.out.println, Log4j, and SLF4J for effective …
↗
How-tos
What Does Instantiate Mean in Java
Learn what it means to instantiate a class in Java, how new creates an object reference, and how constructors and instance fields establish object state.
↗
No articles found
Try clearing the filters.