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]
2 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]2 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
The two outputs of a digital controller for an automatic drip coffee maker are for the time
victus00 [196]
The answer is (d.) display and pilot light

An automatic drip coffee maker displays two output from the digital controller; the time and the light or output signal. According to the US Patents publication, an automatic drip coffee maker includes a timer circuit. It's to provide pre-selected time for the activation and deactivation of the coffee maker.
7 0
2 years ago
Best gaming chairs under 150 (facts)​
adelina 88 [10]

Answer:

IKEA ÖRFJÄLL/SPORREN Swivel Chair, White, Vissle Light Green 191.623.75

Explanation:

it's Ikea

7 0
3 years ago
Which of these number systems uses the most unique characters?
makvit [3.9K]

Answer:

i say hexadecimals

Explanation:

The hexadecimal numeral system, often shortened to "hex", is a numeral system made up of 16 symbols (base 16). The standard numeral system is called decimal (base 10) and uses ten symbols: 0,1,2,3,4,5,6,7,8,9. Hexadecimal uses the decimal numbers and six extra symbols.

4 0
3 years ago
A director notices that one of his camera operators is carrying an accessory without packing it properly in a bag to avoid hurti
slega [8]

Answer:

B. a tripod

Explanation:

We cannot have any problem with the electronic viewfinder, because is part of the camera, with this viewfinder we can see the picture that we will take.

A camera lens can be huge or tiny, but we cannot hurt anyone with them, and headphones are harmless.

In this example we have a tripod, there are different types of tripods, but always have three legs, and we could hurt someone if we don't carry it properly.

7 0
2 years ago
Write a macro to change a decimal degrees (e.g. 245.678) to degrees, minutes, seconds (e.g. 245° 40' 40.8"). Input and output us
Brut [27]

Answer:

All the procedure is explained below step-by-step

  1. Press alt+F11 to open VBA in excel.
  2. Create a module and start entering the subroutine.
  3. The coding of subroutine is attached in the image.

For adding "RUN" button:

  1. Select a shape on the sheet for the button.(Insert > Shapes > Rectangle).
  2. Double click on the shape to add text and write "RUN".
  3. The button can be styled by adding colors and shadows.
  4. Now Assign macro to the button (Right click  > Assign macro).
  5. A window pane will appear, select the macro from This workbook list so that it may work properly when shared with others.
  6. Press OK.
  7. "RUN" button has been created and by pressing it the subroutine will work as required.

4 0
2 years ago
Other questions:
  • What is an example of an Internet access problem?
    15·2 answers
  • Plllzzzzzzzzzzzzzz annnssswweeweerrr...
    6·1 answer
  • Which scientific law states that if a light source radiates isotropically, the light intensity falls off the further you get fro
    5·1 answer
  • When might be the best time to start saving for retirement?
    11·2 answers
  • A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the clie
    11·1 answer
  • jenny wants to create a resume after a two year gap. what should she consider? jenny has a two year gap between her last two job
    7·2 answers
  • which one of the following word process feature saves you the most time when you keying in a document
    9·1 answer
  • Henry conducted a survey on an ad done by his company. In the survey, he asked people to evaluate the ad and state whether they
    8·1 answer
  • Even if you cannot afford it you should donate at least 5 of your earnings to charity true or false
    8·1 answer
  • Haley is responsible for checking the web server utilization. Which things should she review while checking the server utilizati
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!