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
jeyben [28]
3 years ago
9

Write a program that creates a Date object, sets its elapsed time to 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10

000000000, and 100000000000, and displays the date and time using the toString()
Computers and Technology
1 answer:
Lady bird [3.3K]3 years ago
3 0

Answer:

Explanation:

The following Java program creates various Date objects for each one of the provided milliseconds in the question. Then it calls the toString() method on each one. The last two milliseconds were not included because as a long variable they are too big for the Date object to accept. The code has been tested and the output is shown in the image below.

import java.util.Date;

class Brainly {

   public static void main(String[] args) {

       Date date = new Date();

       date.setTime(10000);

       System.out.println(date.toString());

       Date date2 = new Date();

       date2.setTime(100000);

       System.out.println(date2.toString());

       Date date3 = new Date();

       date3.setTime(1000000);

       System.out.println(date3.toString());

       Date date4 = new Date();

       date4.setTime(10000000);

       System.out.println(date4.toString());

       Date date5 = new Date();

       date5.setTime(100000000);

       System.out.println(date5.toString());

       Date date6 = new Date();

       date6.setTime(1000000000);

       System.out.println(date6.toString());

   }

}

You might be interested in
When the increment or decrement operator is placed before the operand (or to the operand's left), the operator is being used in
Salsk061 [2.6K]

When the increment or decrement operator is placed before the operand (or to the operand's left), the operator is being used in prefix mode. Postfix mode on the other hand is when the increment or decrement operator is placed after the operand (or to the oper and's right) .


8 0
3 years ago
The following are part of characteristics of a software requirement specification.
marusya05 [52]

Answer:

should there be 'except' in the question?

6 0
3 years ago
14. The heart of a computer is<br> a CPU<br> b. Memory<br> c. I/O Unit<br> d. Disks
NNADVOKAT [17]

Answer:

CPU

I dont know a whole ton about computers. But I'm confident this is correct. Without the CPU the other options on this list wouldnt work so the CPU would be the "heart".

3 0
3 years ago
List and explain three ways study groups benefit your learning.
SashulF [63]

Answer:

Studying in groups can have many effective outcomes and be beneficial. Here are some ways studying in a group is benefical,

1.  More support, limits chances of procrastination

<u>      With many people, everyone is assigned a role or there is more determination by all peoples to get the work done than an individual being the only one responsible than many trying to accomplish the completion of the project. </u>

2. More people means more parts can get done effectively and taking notes is easier.

<u>      More people allow the work (depending on the project of assignment) for the work to get more focused and worked on faster with the designated roles given. </u>

3. More interactive and allows (sometimes an enjoyable times) and to even learn faster than independently.

      People, not all however, might like the company, there's support and even people skills is enhanced by being in the group.

3 0
2 years ago
A specially formatted encrypted message that validates the information the CA requires to issue a digital certificate is known a
Pavel [41]

Answer:

Certificate Signing Request(CSR).

Explanation:

Certificate Signing Request(CSR):- It is a message that is specially encrypted Which validates the information that is required by CA for the issuing of a digital certificate.

It is the first step towards getting your own SSL certificate.

So we conclude that the answer to this question is Certificate Signing Request (CSR).

5 0
3 years ago
Other questions:
  • In three to five sentences, describe how you can organize written information logically and sequentially
    8·1 answer
  • How old is the oldest asian
    14·2 answers
  • Which wireless device does the manager most likely have before being offered the upgrade by her supervisor?
    8·2 answers
  • Discuss the differences between permanent internal memory and volatile internal memory.
    14·1 answer
  • Write a function called simulate_several_key_strikes. It should take one argument: an integer specifying the number of key strik
    7·1 answer
  • All of the following are current key technology trends raising ethical issues except:_________
    13·1 answer
  • Big Project, Giving 5 stars, a Thanks, 80 points, and Branliest to whoever answers them correctly
    9·2 answers
  • If you're a beginner to data analysis, what is the first thing you should check when you build data queries?
    11·1 answer
  • Write a program that generates 100 random numbers and keeps a count of how many of those random numbers are even and how many of
    15·1 answer
  • I have a problem. I can't cycle between game packs on my strike pack, I've watched so many vids I'm on Xböx and I'm holding the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!