All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,980 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 314 of 398Java int to char: Conversion and Pitfalls
java int to char: Java int to char conversion involves direct casting, which interprets the int as a Unicode code point. Understand behavior, pitfalls, and when to use...
Convert java char to int
Learn how to convert a Java char to an int, including digit-value extraction, Unicode behavior, and common pitfalls.
Java Double.parseDouble: Parsing Strings to Doubles
See how to use Double.parseDouble to convert strings to primitive doubles, handle invalid input and locale-specific numbers, and choose between parseDouble and valueOf.
Convert a Java String to Double: Syntax and Pitfalls
How to convert a Java string to double using Double.parseDouble and Double.valueOf, including NumberFormatException handling and locale-related pitfalls.
Java parseInt vs valueOf: Which Integer Conversion to Use
Compare Java's Integer.parseInt and Integer.valueOf: primitive vs wrapper return types, caching behavior, autoboxing effects, and when to use each method.
Java Integer.valueOf: Caching and Usage Explained
Understand Java's Integer.valueOf() method: its caching behavior, differences from parseInt, and when to use it for efficient and correct code.
Java Integer parseInt: Parsing Strings to Integers
A practical guide to Java's Integer.parseInt: syntax, NumberFormatException handling, radix parsing, and the difference from Integer.valueOf.
Java String to int: Parse and Handle Errors
java string to int: Convert a Java String to int using parseInt and valueOf, handle invalid input, and avoid common pitfalls with practical examples.
Java int to String: Choosing the Right Conversion Method
Learn the differences between Integer.toString, String.valueOf, and concatenation for converting int to String in Java, including edge cases and performance.
Java Double to Int: Cast, Round, and Overflow
Converting a double to an int in Java: learn how the direct cast truncates, how Math.round rounds, how overflow and NaN behave, and when each approach fits.