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
____________________________ and _________________________ are 2 negative impacts of the internet on businesses.
Bogdan [553]

Answer:

i no you its me remember and the answer is b.

Explanation:

7 0
2 years ago
HELP ME PLEASE !!!!!!!!!!
Snezhnost [94]

Answer:

the last one

Explanation:

8 0
3 years ago
The Internet may best be compared to a/an
Usimov [2.4K]
A volcano because its always erupting
3 0
3 years ago
Which of the following best describes a server?
Lady_Fox [76]

Answer:

number 4

Explanation:

7 0
2 years ago
Read 2 more answers
Both successors to C++, _____ , by Sun Microsystems, and _______, by rival MicroSoft, are very similar.
Tanzania [10]

Answer: Java and Forth

Explanation:

   C ++ and Java are comparatively similar language which are composed statically, unequivocally, and obviously. Both language are the object-oriented and planned with the semi-interpretation and run-time during the compilation of the time.

Both uses the curly braces and also they are very similar language as compared with c# and c. Both the successors in the C++ , java and sun micro-system are similar in terms of Microsoft.

 

8 0
3 years ago
Other questions:
  • What was one of the main purposes of the first computer systems?
    11·1 answer
  • When called upon to give an impromptu speech, it is a good idea to do all of the following, except:
    11·2 answers
  • Senior executives at a global manufacturing company are determining the key performance indicators they'll use to judge how effe
    15·1 answer
  • (I made this up teehee) what anime is katski bakugo from
    15·2 answers
  • What is the most important for you to choose before you build a network?
    7·1 answer
  • When you _____ a scroll bar, a shortcut menu appears with commands related to the scroll bar
    10·1 answer
  • If the supply of computer engineers increases at the same time that the demand for these workers decreases, what would be the MO
    7·1 answer
  • what social media application that affect our day to day activities, and how did it improve our skill
    9·1 answer
  • Gabriel's sister called him about a message that suddenly appeared on her screen that says her software license has expired and
    11·1 answer
  • 11.6 Code Practice edhesive
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!