Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
Java class is a basic concept of object-oriented programming. Java is an object-oriented programming language, so Everything in java is associated with java classes. In this article, we will learn about java classes and use Java classes with example programs.
Star pattern programs in Java demonstrate the use of nested loops and control structures, creating shapes like squares, pyramids, diamonds, and hollow squares with illustrative code examples and outputs.
Learn how to calculate simple interest in Java using user input, exception handling, and validation. This article includes step-by-step explanations, example code, and techniques for handling invalid user inputs effectively.
Learn how to identify vowels and consonants in Java using if-else and switch statements. This article explains character validation and control flow and provides example programs for clarity and practice.
Learn to identify Armstrong numbers in a given range using Java. This article explains logic, digit manipulation, and mathematical operations, with an example program to detect and display Armstrong numbers efficiently.
This article explains how to determine leap years in Java using conditional statements, ternary operators, functions, and Java's built-in `Year` class, with code examples and clear explanations for each method.
The article "3 Easy Ways to Find the Missing Number in an Array in Java" explains how to efficiently find the missing number in an array of numbers ranging from 1 to n. It presents three straightforward methods to solve the problem.
In this article, we explained how to find the largest and smallest numbers in an array in Java. The process involves initializing two variables, one for the largest and one for the smallest number, with the first element of the array.
Learn how to display and format the current date and time in Java using `LocalDate`, `LocalTime`, `LocalDateTime`, `ZonedDateTime`, and `DateTimeFormatter` from the `java.time` package with practical examples.
Learn how to implement Bubble Sort, Merge Sort, and Quick Sort in Java, with explanations of how each algorithm works and its trade-offs.
Learn three methods to check odd or even numbers in Java using modulus, bitwise, and ternary operators with clear examples, explanations, and practical insights for beginners.
Explore three methods to display prime numbers in Java: Simple Loop, Square Root Optimization, and Sieve of Eratosthenes, with detailed explanations, code examples, and efficiency comparisons for each approach.
The topic "How to Set Up the Java Path on Windows" covers the essential steps needed to configure your system so that Java commands can be run from anywhere in the command line.
Discover multiple techniques to generate random numbers in Java using `java.util.Random` and `Math.random()`, with detailed explanations, code examples, and practical use cases for simulations, gaming, and cryptography.
This guide walks you through the process of writing and running a simple Java program on a Windows computer. It covers the installation of the Java Development Kit (JDK), setting up your environment, writing a basic Java program (a car simulation), and compiling and running the program using Command Prompt.
Reversing a string in Java is a common task that involves reversing the order of characters in a string. For example, "Hello" becomes "olleH". To accomplish this in Java, we can use the StringBuilder class, which allows us to efficiently manipulate and reverse strings.
This article explores various methods to print "Hello, World!" in Java, introducing beginners to Java's syntax and structure. Examples include basic output, methods, string variables, and StringBuilder for dynamic messages.
This article demonstrates creating a Java-based console currency converter that converts amounts between USD, EUR, and INR using predefined exchange rates. It includes user input, conversion logic, and sample code.
Learn how to take user input in Java using BufferedReader and Console classes. This guide includes detailed explanations, code examples, error handling, and practical applications for seamless input handling.
Learn how to capture user input in Java using the Scanner class. This guide covers importing, creating Scanner objects, reading inputs (strings, integers, doubles), and handling exceptions with examples.
In this article, you will learn a way of getting input from users in Java. The Java Scanner class simplifies user input by parsing tokens with default whitespace delimiters. This article demonstrates its use through examples, showcasing user interaction and effective input handling.
An IDE (Integrated Development Environment) is a software tool that helps developers code, test, and debug efficiently. Popular Java IDEs in 2024 include IntelliJ IDEA, Eclipse, NetBeans, and more.
Learn matrix multiplication in Java through this practical guide! Understand its rules, explore a complete code example using nested loops, and master this essential operation for programming and data applications.
Learn matrix subtraction in Java with a step-by-step guide and code example. This operation, essential in fields like data analysis and computer graphics, subtracts matrices element-wise to produce a new matrix.
Learn how to add two matrices in Java with a simple and clear code example. This article explains matrix addition, implementation steps, and sample output for better understanding.
This article demonstrates implementing CRUD operations in Java with a console-based Student Management System, allowing users to add, view, update, and delete student records using a simple menu-driven interface.
This article provides a step-by-step guide to implementing the "Rock, Paper, Scissors" game in Java, complete with a demo video and downloadable source code, covering game rules and logic.
This latest release introduces updates in pattern matching, memory management, and enhanced API functionalities. Java 23 simplifies coding tasks, boosts efficiency, and strengthens application stability.
Staying updated with essential web APIs is vital for developers to build efficient, scalable, and user-friendly applications. This article explores key APIs, including Geolocation, Web Workers, and Web Sockets, with Java examples.
Pattern matching for switches in Java 17 enhances code readability and simplifies working with complex data structures. It allows you to match object types, use type patterns, and add conditions with guarded patterns.
Everything on Java, not only its articles: the Java page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article