Science, asked by gmvidya99, 4 months ago

Create a new Java project with "AddressDetails.java" file and implement a Java code to display your
address.
Sample Output
Door No: D089
Street: St. Louis Street
City: Springfield
ZIP Code: 62729​

Answers

Answered by deepalidongre6
4

Answer:

This file contains the solution.

Explanation:

Attachments:
Answered by dreamrob
5

Program:

import java.util.*;

public class AddressDetails

{

   public static void main(String args[])

   {

       Scanner Sc = new Scanner(System.in);

       String D, S, C;

       int zip;

       System.out.print("Enter Door No. : ");

       D = Sc.nextLine();

       System.out.print("Enter Street : ");

       S = Sc.nextLine();

       System.out.print("Enter City : ");

       C = Sc.nextLine();

       System.out.print("Enter ZIP C0de : ");

       zip = Sc.nextInt();

       System.out.println("\nDoor No. : " + D);

       System.out.println("Street : " + S);

       System.out.println("City : " + C);

       System.out.println("ZIP C0de : " + zip);

   }

}

Output:

Enter Door No. : D089

Enter Street : St. Louis Street

Enter City : Springfield

Enter ZIP C0de : 62729

Door No. : D089

Street : St. Louis Street

City : Springfield

ZIP C0de : 62729

Similar questions