Java Tutorial

Java Exception Handling Tutorial: try-catch-finally, try-with-resources and Custom Exceptions

Submitted by jaypabs on

Sooner or later every Java program meets bad input, a missing file or a network that is down. If you do not plan for it, your program crashes with a long red stack trace, and in a capstone defense that usually happens at the worst possible moment. Exception handling is how Java lets you catch those problems, react to them, and keep the program running or fail with a clear message.

Java Stream API Tutorial with Examples: filter, map, sorted, groupingBy and Collectors

Submitted by jaypabs on

If you have written Java for a while, you have probably written the same loop a hundred times: go through a list, check a condition, add matching items to a new list, then compute a total or an average. The Java Stream API lets you write that kind of code in a few readable lines, and it is used everywhere in modern Java, from Spring Boot projects to coding interviews.

Java HashMap Tutorial with Examples: put, get, Iterate, Count, and Sort by Value

Submitted by jaypabs on

Almost every real program needs to look something up quickly: a student's grade by ID number, a product's price by its code, or how many times a word appears in a text. In Java, the go-to tool for this job is the HashMap. It stores data as key-value pairs and can find a value by its key almost instantly, no matter how many entries it holds.

Android: Simple Stopwatch Dedicated For Beginners

Submitted by razormist on
In this tutorial we will try to create a Simple Stopwatch Using Android. Android is most commonly comes installed on a variety of smartphones and tablets, and even in TV. Android is an open source so that developer find it easy to develop and expand new features. So let's do the coding... Getting Started: First you will have to download & install the Android Development IDE (Android Studio or Eclipse).

Count SubString in a Large String in Java

Submitted by donbermoy on
This tutorial will teach you how to create a program that will have an example of Caret Event and Listener in Java. A CaretEvent lets the user notify interested parties that the text caret has changed in the event with its source. Note: A caret is the cursor indicating the insertion point So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of countSubStrings.java. 2.

Point Of Sale System for Restaurant (Java Console)

Submitted by donbermoy on
This Point of Sale System for Santa Klaus Restaurant was programmed in Java Console without any database. The features of the system are the following: - Login - Ordering - Order Information - Customer Information - Billing - Viewing of Dish - Inventory - Filtered all errors Account Information: username: admin password: admin For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards, Engr.

Graphics: drawString Method in Java

Submitted by donbermoy on
Today in Java, i will teach you how to create java program that will have the drawString method in creating graphics in applet. The drawString() method, takes as parameters an instance of the String class containing the text to be drawn, and two integer values specifying the coordinates where the text is placed (x and y coordinates in the screen). So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of drawString.java. In the classname, extend a java.applet.Applet to have an applet library. 2.

Create Applet in Java

Submitted by donbermoy on
Today in Java, i will teach you how to create an applet in Java. An applet is a small application that is viewed on the Web using java. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of sampleApplet.java. In the classname, extend a JApplet to have an applet library. 2.