1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zavuch27 [327]
3 years ago
12

Write a java program that would request user name, id number, and state the time the user has reported at work.​

Computers and Technology
1 answer:
Troyanec [42]3 years ago
3 0

Answer:

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.time.LocalDateTime;

import java.time.format.DateTimeFormatter;

import java.util.Date;

import java.util.Scanner;  

public class Main {

   private static final DateFormat dateformat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

   private static final DateTimeFormatter datetimeformat = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");

   public static void main(String[] args) {

       

       System.out.println("Enter your ID and Name");

       LocalDateTime current = LocalDateTime.now();

       Scanner sc1 = new Scanner(System.in);  

       String Name= sc1.nextLine();

       int ID = sc1.nextInt();

       System.out.println(Name + "reported at:");

      System.out.println(datetimeformat.format(current));

   }

}

Explanation:

The above program saves the current date-time as well, at the time when the user enters his name and ID. And it prints the same on the screen. Further, you can store these in a data structure like list or class or you can store it in a database as well. Remember, this is the difference between a program and a web application, and not to forget we have a toolkit in case of the web application. And here we are working on the console. Also, a web application has a front panel and back panel. However, a program only solves a computing problem, and there is no well-designed interface with the user. However, programming is the root of all other programmings like web programming, mobile app programming, etc.

You might be interested in
My brainly is no hello friend , i need you can you help me, please okay
Pachacha [2.7K]

Answer:

I'll try to help you!

what do you need?

Explanation:

I hope you have an amazing day!

✧◝(⁰▿⁰)◜✧

8 0
2 years ago
Read 2 more answers
¿que significa “TTAQMMQMPDATLSPLNDTMGCCLFEQMMPQTEIUMDR” ?
OlgaM077 [116]

Answer: what

Explanation:

5 0
2 years ago
Read 2 more answers
Write a program that outputs "Hello World!" For ALL labs, end with newline (unless otherwise stated).
Vesnalui [34]

The program that output "Hello World " is represented as follows:

print("Hello World")

<h3 /><h3>Code explanation:</h3>

The code is written in python.

We use the print statement to print out the string word "Hello world".

When the code is run, the output of the code will be "Hello world".

"Hello world" is a string.

learn more on python code here: brainly.com/question/21497685?referrer=searchResults

8 0
2 years ago
Character literals are enclosed in ________; string literals are enclosed in ________. Group of answer choices double quotes; do
adelina 88 [10]

Answer:

Single quotes; Double quotes

Explanation:

Character literals is a type of literal in Java programming used for denoting constant valued character. Examples are 'g', '6', 'A' '+' etc.

String literals is a type of literal in Java programming used for representing or displaying of a sequence of characters or string values. Examples are "Hello Brainly user"

In Java programming, Character literals are enclosed in single quotes, string literals are enclosed in double quotes.

7 0
3 years ago
What is the term for a program that performs a repetitive task on a network?
Andrews [41]
Bot. A program that performs a repetitive task on a network. Cybercriminals install malicous bots on unprotected computers to create a botnet. Zombie army. (also calledBotnet) groups of bots
7 0
3 years ago
Other questions:
  • Ar count = 10;
    13·1 answer
  • Evaluating how current, credible, and unbiased a source is ensures:
    7·1 answer
  • What enables a website to recognize a computer as a return visitor (as opposed to a first-time visitor)?
    12·1 answer
  • Software that helps users to communicate with family, friends and business colleagues by posting personal information, status up
    13·2 answers
  • Kelly is a college sophomore majoring in computer science. She is interested in gaining exposure to the most useful and current
    13·1 answer
  • 50 POINTS!!!
    14·1 answer
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. Certain project
    11·1 answer
  • How does it transform your ways of socializing
    11·1 answer
  • You defined a class and saved it as shoe.py.
    5·2 answers
  • If there is a secure socket layer in place, what will you need in addition to a user id in order to access the shared files?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!