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 code size of 2-address instruction is________________.? 5 bytes? 7 bytes? 3 bytes? 2 bytes
Finger [1]

Answer:

7 bytes

Explanation:

<u>2 Address Instruction</u>

The 2 address instruction consist 3 components in the format.

One is opcode,other two are addresses of destination and source.

<u>Example-</u>

load b,c | Opcode   destination address,source address

add a,d  | Opcode   destination address,source address

sub c,f    | Opcode   destination address,source address

Opcode consists of 1 bytes whereas destination address and source address consist of 3 bytes each.

(1+3+3) bytes=7 bytes

5 0
3 years ago
List at least three things that are included as part of property rights.
KatRina [158]
1) exclusivity of rights to choose the use of the resource

2) exclusivity of rights to the severices of a resource

3) rights to exchange at mutually agreeable terms
4 0
3 years ago
What is an icon or animation used to represent aparticipant in an internet chat referred to as?
Veronika [31]
Emoji is an icon or animation used to represent a participant in an internet chat.
8 0
3 years ago
These are code parts which can be collapsed or extended
skelet666 [1.2K]

Answer:

?????????? are there any options

3 0
3 years ago
Suppose you wanted to save your master audio recording in an uncompressed format. Which of the following audio file formats shou
faust18 [17]

Answer:

MP3

Explanation:

It is MP3 because it is the best audio to use for audio input

5 0
3 years ago
Read 2 more answers
Other questions:
  • Students recently created a Gaming Club at their school. On Friday of every week, students bring in their gaming consoles (Xbox,
    10·1 answer
  • Which field can be used to track the progress on tasks that a user has created?
    10·1 answer
  • What is the top folder of the file tree called
    5·2 answers
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • Information from the system that is used to make modifications in the input, processing actions, or outputs is referred to as: G
    9·2 answers
  • Linda is the education manager for a national coding service company. Once a month she holds a videoconference with all her codi
    14·1 answer
  • Your bluetooth headset is waiting for another bluetooth device to locate its signal. what is this mode known as?'
    8·1 answer
  • The need to strike a<br>- among work, life, family, and other responsibilities is<br>universal.​
    15·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • One of the most notable impacts of IT on business is improved
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!