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
Ne4ueva [31]
3 years ago
8

Assume the variable date has been set to a string value of the form mm/dd/yyyy, for example 09/08/2010. (Actual numbers would ap

pear in the string.) Write a statement to assign to a variable named dayStr the characters in date that contain the day. Then set a variable day to the integer value corresponding to the two digits in dayStr.
Computers and Technology
1 answer:
bonufazy [111]3 years ago
6 0

Answer:

String date = "21/05/2020";

String dayStr = date.substring(0,2);

int day = Integer.parseInt(dayStr);

System.out.println(day);

Explanation:

Create a variable called <em>date</em> which holds the current date

Create a variable called <em>dayStr</em>. Initialize it to the day part of the <em>date</em> using the substring method

Create a variable called <em>day</em>. Parse the <em>dayStr</em> and assign it to the <em>day</em>

Print the <em>day</em>

You might be interested in
Which function would you use to make sure all names are prepared for a mailing label?
Akimi4 [234]

Start Word. ...

On the Mailings tab, in the Create group, click Labels.

Leave the Address box blank.

To select the label type and other options, click Options.

In the Label Options dialog box, make your choices, and then click OK.

4 0
3 years ago
Read 2 more answers
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
1. A truck leaves a stop sign and accelerates uniformly over a time of 5.21 seconds for a
Rufina [12.5K]

Answer:

1, is 21.11 meters per second.

110/5.21

Explanation:

3 0
3 years ago
How is the number 110 written when expanded out to place values in the base 2 (binary) number system?
Vinil7 [7]
C is correct answer ......
3 0
3 years ago
What kind of storage is an internet service that provides storage to computer or mobile users?
Free_Kalibri [48]

Cloud is a kind of storage, which is an internet service that provides storage to computer or mobile users. This information technology enables ubiquitous access to shared pools of configurable system resources.

Time-critical data and images can be immediately viewed while away from a main office or location.

4 0
3 years ago
Other questions:
  • 10. Which of these is not an HTTP verb? PUT AJAX GET DELETE
    12·1 answer
  • When the increment or decrement operator is placed before the operand (or to the operand's left), the operator is being used in
    6·1 answer
  • When assembling a desktop computer you should always install the drives before the motherboard?
    9·1 answer
  • The Status bar is used to control the majority of the drafting settings in AutoCAD
    13·1 answer
  • Question 4 (Multiple Choice Worth 5 points)
    6·1 answer
  • Why is there no I do you time of day when all students should study
    10·1 answer
  • Assume that the message M has to be transmitted. Given the generator function G for the CRC scheme, calculate CRC. What will be
    15·1 answer
  • A(n) ______ has moving mechanical parts, which makes it less reliable than solid-state drives, but its metal platters are sealed
    9·2 answers
  • Answer the following 8-mark question in your book.
    15·1 answer
  • write a program which prompts the user for a celsius temperature, convert the temperature to fahrenheit, and print out the conve
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!