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]
4 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]4 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
The scientific process is most similar to what
Papessa [141]

Answer:

A dyagram

Explanation:

Have a nice day.

-London

8 0
3 years ago
Match each word to its correct meaning.
seropon [69]
1. goes to C.

2. goes to B.

3. goes to A.
6 0
3 years ago
What is the function of the NOS? Select all that apply.
Zigmanuir [339]

Answer:

.network management

Explanation:

pls need brainliest

3 0
3 years ago
Read 2 more answers
Which of the following contains fair use?
Reptile [31]
The answer to your question is D
8 0
4 years ago
BRAINLIEST!!!!!!!!!!!!!!
Contact [7]

Answer:

Open

Explanation:

Trust

6 0
2 years ago
Read 2 more answers
Other questions:
  • What identifies available computers through the internet?
    14·1 answer
  • What is the purpose of a scatter plot introduction to computer applications
    6·2 answers
  • Because public key encryption requires the use of two different keys, it is also known as _____ encryption
    13·1 answer
  • Obtain a file name from the user, which will contain data pertaining to a 2D array Create a file for each of the following: aver
    5·1 answer
  • Where does a computer store it’s information
    11·1 answer
  • Generally considered to be the most important information security policies, what item below defines the actions a user may perf
    11·1 answer
  • Enter key is also known as Return key. (True or false)
    13·2 answers
  • Fill in the blank: _________ is Google’s machine-learning artificial intelligence system that interprets people’s searches to fi
    9·1 answer
  • 50 ) What is the cell address of 4th row and 4th column? A) 4D B) E4 оооо C) 04 D) B4​
    9·1 answer
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!