Simple Console Java Application Using NetBeans Hotel Menu Project

Introduction 

 
Hello Friends today I will explain Java technology using Netbeans. In these projects we will learn how to create java console hotel menu projects step by step. We will also learn how to use Netbeans and write a simple Java program using Netbeans.
 
Step 1
 
You should have any version of NetBeans installed in your machine.  I have installed NetBeans IDE 8.1 open NetBeans
 
Java
 
Step 2
 
Select Java language and java Application in the projects section then click to next.
 
Java

Step 3
 
Enter the project name --  my project name is Hotel 1click to finish.
 
Java

Step 4
 
This is simple and easy to understand with the comments section. 
  1. package hotel;  
  2. import java.util.Scanner;  
  3. public class Hotel {  
  4.  int choice;  
  5.  String menu;  
  6.  void show() {  
  7.   Scanner s = new Scanner(System.in);  
  8.   System.out.println("Enter your choice");  
  9.   System.out.println("Enter 1 for Coffee");  
  10.   System.out.println("Enter 2 for Tea");  
  11.   System.out.println("Enter 3 for Cold Drink");  
  12.   choice = s.nextInt();  
  13.   if (choice == 1) {  
  14.    System.out.println("you have select Coffee");  
  15.    System.out.println("menu");  
  16.    menu = s.nextLine();  
  17.   }  
  18.   if (choice == 2) {  
  19.    System.out.println("you have select Tea");  
  20.    System.out.println("menu");  
  21.    menu = s.nextLine();  
  22.   }  
  23.   if (choice == 3) {  
  24.    System.out.println("you have select Cold drink");  
  25.    System.out.println("menu");  
  26.    menu = s.nextLine();  
  27.   }  
  28.  }  
  29.  public static void main(String[] args) {  
  30.   Hotel h = new Hotel();  
  31.   h.show();  
  32.  }  
  33. }   
Step 5
 
Below is the screenshot output

Java
 
Thank you for reading. I hope this article was helpful to you. Please share any feedback or suggestions.