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 of the following best reflects why lighting systems are used when filming on location outdoors? (Select all that apply.)
cupoosta [38]
<h2>All the given answers are right</h2>

Explanation:

  • Lighting is one of the key factor which is essential to do cinematography
  • It will help to cut off the shadows that is created using natural light
  • It can depict the mood of the scene that is shoot
  • We can adjust manually brightness and darkness according to the need, which is not possible in the natural light.
  • It can boost the quality of the footage
  • We can shoot anytime irrespective of the weather condition
  • The light from the camera alone is not enough to shoot the best picture
8 0
2 years ago
You work in an office that uses Linux servers and Windows servers. The network uses both the TCP/IP protocol. The Linux server i
kap26 [50]

Answer:

The answer is "ifconfig".

Explanation:

The ifconfig. me is indeed a website that shows basic network packets, like IP address, hostname, user agent string. It provides a simple interface that may be queried with the assistance of the command prompt to obtain the required information. The whole function provides the essential information about a certain program's interface.

5 0
3 years ago
Which is the last step in conducting a URL search?
dimulka [17.4K]
The user's browser renders the html code as a visual web page
3 0
3 years ago
In which of the following situations may you pass on the right
Natasha2012 [34]
In driving your vehicle, it is best to pass on the right after you slow your vehicle down and check for the road whether there is an upcoming vehicle or not. When the road is clear, it is best and safe to pass on the right after making sure that the coast is clear.
3 0
2 years ago
Read 2 more answers
QUESTION 11
tino4ka555 [31]

Answer:

x == 32

Explanation:

CODE in Java:

       int x = 32;

       if(x == 32){

           System.out.println("Pass");

       }

       else{

           System.out.println("Fail");

       }

OUTPUT:

Pass

8 0
2 years ago
Other questions:
  • Can someone fix this so that it only says "its a payday" on 15 and 30 and on all other days "sorry, it's not payday"
    9·1 answer
  • To access WordPad, Jill will click on Start, All Programs, Accessories, and WordPad. To access Notepad, Karl will click on Start
    5·1 answer
  • Researching the history of computers is a good troubleshooting technique.<br> True or False?
    5·1 answer
  • Unix is called a(n) ___________ operating system because it can run on a desktop pc or a server. operating systems installed on
    7·1 answer
  • Eniac was the first desktop computer. t/f
    5·1 answer
  • printLarger is a method that accepts two int arguments and returns no value. Two int variables, sales1 and sales2, have already
    11·1 answer
  • Help me pls!!! last question
    9·1 answer
  • Can you answer this question?
    9·1 answer
  • What kind of skill is persuasion?
    7·1 answer
  • Fill in the blanks with the correct words.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!