public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -> System.out.println(name); String name1 = name.toUpperCase(); Runnable r2=() -> System.out.println(name1); r1.run(); } }
What is the output of the above program?

Answers

Answer 1

Answer:

Concept: Programming

You take a string as an input, and you output the result which is a user defined name.Then you take that name and turn all the strings to uppercase in name and return that result.Rate brainlist
Answer 2

The output of the given program is,

''WelcomeJava''

Given program is,

public class Main {

   public static void main(String[] args) {

       String name = "WelcomeJava";

       Runnable r1 = () -> System.out.println(name);

       String name1 = name.toUpperCase();

       Runnable r2 = () -> System.out.println(name1);

       r1.run();

   }

}

Now, This program defines a class called Main, with a main method as the entry point.

It declares a String variable name with the value "WelcomeJava".

Then, it creates a Runnable r1 that prints the value of the name when executed.

Next, it converts the name to uppercase and assigns the result to name1.

Finally, it creates another Runnable r2 that prints the value of name1 when executed.

In the main method, r1 is called using the run method, resulting in the output "WelcomeJava".

Read more about Python programs at:

brainly.com/question/26497128

#SPJ4


Related Questions

Write a recursive function named double_digits that accepts an integer as a parameter and returns the integer obtained by replacing every digit with two of that digit. For example, double_digits(348) should return 334488. The call double_digits(0) should return 0. Calling your function on a negative number should return the negation of calling it on the corresponding positive number; for example, double_digits(-789) should return -778899.

Answers

Answer:

A recursive function known as double-digit is a function that accepts as a parameter and returns the integer that is obtained by changing each digit with double digits. For example 425 should be return as 442255.

In the given scenario

the function will be as follow

If

def double_digits:

n < 0:

return -1 * double_digits ( -1 * n )

elif n = 0

return o

else:

result

double_digits ( n // 10 )

return int ( str ( result ) + str ( n % 10 ) + str ( n % 10 )

Test the function as follow

print ( double_digits ( 348 ) )

Result

334488

Test the function as follow

print ( double_digits ( 0 ) )

Result

0

Test the function as follow

print ( double_digits ( -789 ) )

Result

-778899

CPU is an abbbreviation for
1.Central processing unit
2.Computer processing unit
3.Control processing unit

Answers

Answer:

1.Central processing unit

Explanation:

CPU is an abbreviation for Central processing unit.

how to earn money fast in adopt me?

Answers

Become a baby and take care of yourself and pets

Answer:                                                                                                                        If you want money in adopt me quickly, you could become a baby and buy a pet and take care of it and yourself. Also, you could purchase adopt me bucks with robux.

Explanation:

A hacker successfully modified the sale price of items purchased through your company's web site. During the investigation that followed, the security analyst has verified the web server, and the Oracle database was not compromised directly. The analyst also found no attacks that could have caused this during their log verification of the Intrusion Detection System (IDS). What is the most likely method that the attacker used to change the sale price of the items purchased

Answers

Answer:

By modifying the hidden form values that is in a local copy of the company web page

Explanation:

In a situation were the hacker successful change the price of the items he/she purchased through the web site of the company's in which the company web server as well as the company Oracle database were not compromised directly which means that the most likely method in which the attacker used to modified the sale price of the items he/she purchased was by modifying the HIDDEN FORM VALUE that was in the local copy of the company web page making it easy for the HIDDEN FORM VALUE to be vulnerable to the hacker because the hidden form value did not store the company server side information or data but only store the company software state information which is why HIDDEN FORM VALUE should not be trusted.

I'm in Paris and want to take a picture of my mom in front of the Eifel Tower. I want both her and the tower to be in sharp focus. Which aperture is likely to do the best job of giving me that deep depth of field?
a) 2
b) 5.6
c) 11
d) 22
50 Points and brainliest mark

Answers

Answer:

Explanation:

It depends on the day. 5.6 might be best if it is a cloudy day. 2 would not work under any conditions.

11 might work well on a hazy day, but the sun is sort of visible.

A nice clear sunny day would allow you to use 22.

Answer:

Generally, a small aperture like f/8 will give you enough depth of field to be able to make most of your image sharp. However, if the subject is too close to your camera, you might need to either move back or stop down the lens even further to get everything looking sharp

And mostly :

It depends on the day. 5.6 might be best if it is a cloudy day. 2 would not work under any conditions. 11 might work well on a hazy day, but the sun is sort of visible. A nice clear sunny day would allow you to use 22.

Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose for this
purpose?
Mary needs to choose the _________
menu in order to place the text in a desired fashion around the image

Plato btw

Answers

Answer:

she needs to choose the insert menu

Factor 72y+108z

lmk the answer asap

Answers

36(2y+3z)

This is the answer , please mark brainliest if correct.

Janet needs to flag a message for follow-up in Outlook. Which option is not a default?

Today
Tomorrow
Next Week
Next Tuesday

Answers

Answer:

Explanation:

Today

Answer:

Next tuesday.

Explanation: Its to specific

For this program you are given a String that represents stock prices for a particular company over a period of time. For example, you may be given a String that looks like the following:
String stockPrices = "1,22,30,38,44,68,49,73,52,66";
Each number in this String represents the stock price for a particular day. The first number is day 0, the second number is day 1, and so on. You can always assume tha the supplied string will formatted using commas to separate daily stock prices. The individual stock prices will always be valid integers, but they many not always be the same number of digits (i.e. 1 is a valid stock price, as is 1000. Your program should work with strings of any length. The "split" method might come in handy for this problem. Your task is to analyze the supplied string and determine the following:
• The highest price for the stock
• The day when the highest price occurred
• The lowest price for the stock
• The day when the lowest price occurred
Here are two sample runnings of the program:
// First run
Please enter stock prices: 1,22,30,38,44,68,49,73, 52,66
Highest price: 73 ocurred on day # 7
Lowest price: 1 occurred on day # 0
// pecond run
Please enter stock prices: stock_prices - 41,37,40,54,51,63,54,47,23,33
Highest price: 63 occurred on day # 5
Lowest price: 23 accurred on day # 8
Write your program on the following page. You can use this page for rough work.

Answers

Answer:

price = input("Please enter stock prices: ")

x = price.split(",")

min = int(x[0])

max = int(x[0])

for i in x:

    if int(i) < min:

         min=int(i)

    if int(i) > max:

         max=int(i)

index = x.index(str(max))

print("Highest price: "+str(max)+" ocurred on day # "+str(index))

index = x.index(str(min))

print("Lowest price: "+str(min)+" ocurred on day # "+str(index))

Explanation:

This solution is implemented in Python

This prompts user for stock prices

price = input("Please enter stock prices: ")

This places the price in a list

x = price.split(",")

The next two lines initialize the lowest and highest to stock at index 0

min = int(x[0])

max = int(x[0])

This iterates through the list

for i in x:

The following if statement checks for the lowest

    if int(i) < min:

         min=int(i)

The following if statement checks for the highest

    if int(i) > max:

         max=int(i)

This gets the day for the highest stock

index = x.index(str(max))

This prints the highest price and the day it occurred

print("Highest price: "+str(max)+" ocurred on day # "+str(index))

This gets the day for the lowest stock

index = x.index(str(min))

This prints the lowest price and the day it occurred

print("Lowest price: "+str(min)+" ocurred on day # "+str(index))

The system where the unit of measurement is centimeter

Answers

Answer:

International System of Units

Explanation:

Why do people want phones so bad??

Answers

To help explain this, take a look at these reasons why kids should have cell phones:

#1 To keep in touch. What happens if you're running late picking your child up from school? ...

#2 To talk to friends. ...

#3 To stay safe. ...

#4 To develop essential skills. ...

#8 To improve their organization. ...

#11 To encourage responsibility.

Because we live in a world full of technology and we use it for almost everything. They made life easier in some ways

What is a commonly used software access restriction for a computer system connected to other networks such as the internet?
a.Passwords
b. Firewall
c. encryption
d. biometric systems

Answers

Answer:

firewall

Explanation:

You manage a Windows server that has an attached printer that is used by the Sales department. The sales manager has asked you to restrict access to the printer as follows:Sally needs to connect to a printer, print documents, and pause and resume her own print jobs.Damien needs to pause and resume documents for all users, but does not need to change printer properties.You want to assign the most restrictive permissions that meet the sales manager's requirements. What should you do

Answers

Answer:

Damien would be assign the Manage Documents permission while Sally on the other hand will be assign the permission to print.

Explanation:

Based on the information given in order for me to assign a restrictive permission that will meet the requirements of the sale manager's what I will do is for me to assign the Manage Documents permission to Damien reason been that Damien only needs to stop and resume the documents for all users in which he does not need to change the printer properties and to assign the permission to print to Sally reason been that Sally only needs to connect to a printer and to print documents in which she will then stop and resume her own print jobs.

If you are working on doing senior portraits and want a lens that will give you the best shallow depth of field which lens would you choose?
a) 55mm f1.2 (focal length of 55mm, maximum aperture of 1.2)
b) 28-80mm f4.5 (Zoom lens with focal length from 28-80mm, max aperture 4.5)
c) 18mm f5.6
d) 50mm f1.4
45 points and brainliest

Answers

Answer: The answer is C     Hope this helps :)    Please mark Brainliest

Explanation:

Answer:

c) 18mm f5.6

Explanation:

For the best lens that offers the best shallow depth of field, you need to choose the one with the maximum apertature but does not zoom.

Hence choice c) has the maximum aperture and does not zoom.

Hope this helps :)

describe an activity to prove that sounds can travel in a liquid medium
in long



Answers

An activity to prove that sounds can travel in a liquid medium in long​ time is:

Use a tub  that is filled with water, also take a bell in one of your hand and then one can dip it into the water.  Note that you need to Keep one of your ears close to the surface of water and do not let the water go into the ear. Then ring the bell inside the tub water. You will be able to hear the sound very clearly. This tells that sound can travel via liquids.

How do sounds travel in liquids?

Sound waves is known to be one that tends to travel a lot faster in denser forms or kinds of substances due to the fact that neighboring particles will be able to bump into each other.

Therefore, An activity to prove that sounds can travel in a liquid medium in long​ time is:

Use a tub  that is filled with water, also take a bell in one of your hand and then one can dip it into the water.  Note that you need to Keep one of your ears close to the surface of water and do not let the water go into the ear. Then ring the bell inside the tub water. You will be able to hear the sound very clearly. This tells that sound can travel via liquids.

Learn more about sounds from

https://brainly.com/question/1199084

#SPJ1

It is said that Wifi repeater is not good as a rumor

Answers

True your welcome bue

how ssd is better than normal sata and pata HDD​

Answers


The HDD offers high storage capacities at a low price, while the SSD provides blazing fast access speeds at a higher cost.

The advancement of technology in our daily lives has changed how we interact with the world.

Answers

i agree. i think there’s less communication, more anger, mental issues.

what is the purpose of writing a topic sentence​

Answers

Answer:

A topic sentence must highlight the main idea of a paragraph, letting the reader know what the paragraph will be about. The topic sentence must present an idea that will unify the rest of the paragraph while relating it back to the main thesis of the paper.

Explanation:

Answer:

To summarize the main point of paragraph

Explanation:

Jorge is sending a message to Thomas but would like a copy sent to his external email address as well. Jorge does not want Thomas to see this copy that was sent.

Which mail field will Jorge use to achieve this goal?

To:
From:
CC:
BCC:

Answers

Answer:  BCC (fourth choice)

=================================================

Explanation:

CC stands for "carbon copy".

BCC stands for "blind carbon copy".

Filling out forms is a tedious process. It's even more tedious when you have to repeat yourself multiple times. Carbon copy paper technology allows you to fill out one form and have those inputted entries be copied to the layers below. In terms of email, a carbon copy (CC) email is just an email sent to more than one person. In the CC line, recipients can see who the other people are in the email chain.

In contrast, a blind carbon copy is where the recipients cannot see who is in the BCC line. This allows Jorge to send the message copy to an external address without Thomas knowing.

Please help with this

Answers

Answer:

Horizontal lines chart/graph

what is bullk email software​

Answers

Bull email software is a software that is used to send emails in large quantities

Hope this helps

For this exercise, you are going to write a recursive function that counts down to a Blastoff!
Your recursive function will not actually print. It will return a String that can be printed from the main function. Each recursive call will add on to that string.
In your main function, prompt the user for a starting value, then print the results.
Sample Output
Please enter a number to start:
5
5 4 3 2 1 Blastoff!
import java.util.Scanner;
public class Countdown
{
public static void main(String[] args)
{
// Start here
}
public static String countdown(int number)
{
// Base case - return Blastoff!
// Recursive call
}
}

Answers

Answer:

import java.util.Scanner;

public class Countdown {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Please enter a number to start: ");

n = input.nextInt();

System.out.print(countdown(n));

}

public static String countdown(int number) {

if(number>0) {     return " "+number+countdown(number-1);    }

   else    {        return " Blastoff!";    }

}

}

Explanation:

The main method begins here

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

This declares an integer variable n

int n;

This prompts user for a number

System.out.print("Please enter a number to start: ");

This gets user input n

n = input.nextInt();

This calls the countdown function

System.out.print(countdown(n));

}

The countdown function begins here

public static String countdown(int number) {

This is the base case where input number is greater than 0

if(number>0) {     return " "+number+countdown(number-1);    }

This ends the recursion

   else    {        return " Blastoff!";    }

}

What is cybercrime?
Describe some of the various cybercrimes?
What are the laws that govern cybercrimes?
What can we do to prevent being a victim?

Remember to provide examples.

Answers

Answer:

criminal activities carried out by means of computers or the internet is known as cyber crime.

What is the thickness of a character’s outline called

Answers

Answer:

actually is answer is font weight

hope it helped!

A specific packet journey, from your computer to a remote server, end-to-end across multiple networks, has the following link bandwidths (packet travels across each of these links, in order): 1000 Mbps, 1 Mbps, 40 Mbps, 400 Mbps, 100 Mbps, 1000 Mbps. Assuming your computer and the server can transfer data at > = 1000 Mbps (so neither device is limiting the data transfer relative to the links), how long, in seconds, will it take to transfer a 125 MB file?

Answers

Answer:

0.125 seconds

Explanation:

The formula for the time taken to transfer the file is = file size / bandwidth

Assuming the computer and server could only transfer data at the speed of 1000 Mbps or more, The time of transmission is;

= 125 MB / 1000 Mbps = 0.125 seconds.

A __ consists of wires connecting the CPU and other parts of the computer. The __ transfers the data between the CPU and the memory unit.

Answers

Answer: A BUS consists of wires connecting the CPU and other parts of the computer. The DATA BUS transfers the data between the CPU and memory unit.
Explanation: PLATO

The U.S. military's standard for computer security is known as
DCS-3000.
TEMPEST.
Daubert standard.
Carnivore.

Answers

Answer:

TEMPEST.

Explanation:

TEMPEST is an acronym for Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions and it is a secret (classified) project of the government of the United States of America that originated with its military in the 1960s based on the study of security with respect to telecommunication devices emitting Electromagnetic Radiation (EMR).

Hence, the U.S. military standard for computer security is known as TEMPEST.

The main purpose of the Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions (TEMPEST) is to prevent the theft, compromise or interception of informations that are being transmitted on various telecommunications devices through the use of Electromagnetic Radiation (EMR).

Before we can use the PS Session to remotely manage a target system, there are certain tasks we must perform, such as create exception in Firewall and enable WinRM. PowerShell has a cmdlet that can perform all of these tasks at once.
A. Start-PSRemoting.B. Enable-PSRemoting.C. Enable-PSSession.D. Get-PSRemoting.

Answers

Answer:

B. Enable-PSRemoting.

Explanation:

Powershell is a command-line interface software used in windows operating system to manage the operations of the system. It is similar to the bash terminal scripting language in Linux and has some of the command prompt features.

The PS session is used to manage remote systems connected wirelessly to the administrative system. The command used to enable this process is "Enable-PSRemoting".

C:/Users/Documents/resume.docx Where is the "resume" document located in this file structure?

Answers

Answer:

"resume.docx" is located in "Documents"

Explanation:

[<drive-letter:: represents drive name>]:/Main_Directory/Sub_Directory/ETC..

The  "resume" is located in the "Documents" according to the file structure.

Given the information C:/Users/Documents/resume.docx, this can be interpreted as Documents is in the Users folder and the resume can be found in the Document folder.

We can also say that the document folder was created by the user and the "resume" file is placed directly into the documents.

Based on the explanation, we can say that the  "resume" is located in the "Documents" according to the file structure.

Learn more here: https://brainly.com/question/13715153

Other Questions
If f(x) = 1/2x^2 - (1/4x +3), what is the value off(8)? which is an example of heat being transferred by conductiona) A furnace heating the air in a school b) an ice cube melting in a persons handc) A pot of water on the stove boiling d) The sun heating the water in a swimming pool Write a title for a magazine in which you might find the article which accompanies this visual Read the excerpts from Team Moon and the NASA article.And only nowa solid, panic-stricken, gut-wrenching, heart-palpitating ten minutes by clock but feeling like an eternity laterdid it sink in for John Coursen, Tom Kelly, and a lot of the other Grumman folks who had poured years of their lives into building the lunar module: Their baby was on the moon. Let the cheering begin!When the lunar module lands at 4:18 p.m. EDT, only 30 seconds of fuel remain. Armstrong radios "Houston, Tranquility Base here. The Eagle has landed." Mission control erupts in celebration as the tension breaks, and a controller tells the crew "You got a bunch of guys about to turn blue, we're breathing again."How is the information in the excerpts different?A The first excerpt is less emotional than the second excerpt.B The first excerpt is less interesting than the second excerpt.C The first excerpt is more emotional than the second excerpt.D The first excerpt is more interesting than the second excerpt. The sums of n terms of two arithmetic progressions are in the ratio 5n+4: 9n+6. Find the ratio of their 18th terms. What is the best approach to testing a website? visit all pages to verify that they load visit every page and verify all links visit the pages with hyperlinks visit all pages that appear on the navigation menu Theprovides the brain physical protection from traumatic injury. How did cohens v. virginia strengthen federal government? What is the type slope?Please help HELP!!!! 2 dot plots. Both number lines go from 0 to 10. Plot 1 is titled fifth grade. There are 2 dots above 1, 3 above 2, 1 above 3, 4 above 4, 5 above 5, 5 above 6, 2 above 7, 2 above 8, 0 above 9, 0 above 10. Plot 2 is titled seventh grade. There are 2 dots above 0, 2 above 1, 3 above 2, 5 above 3, 5 above 4, 3 above 5, 3 above 6, 1 above 7, and 0 above 8, 9, and 10.The dot plot shows the number of hours, to the nearest hour, that a sample of 5th graders and 7th graders spend watching television each week. What are the mean and median?The 5th-grade mean is .The 7th-grade mean is .The 5th-grade median is .The 7th-grade median is . 7Correct answer I will put as brainiest help ill mark brainliest ill give you a brainliest if it is right What are the Complementary DNA base pairs: GGGCCATATAG. What are the Complementary DNA base pairs: ATTGGCCTAGC PLS HELP!Think about the important contributions of the Phoenicians, Minoans, Mycenaeans, and Etruscans. Consider how each civilization influenced others. Then fill in the following chart. Please help me answer this ! anyone know this two questions I can't figure this out What is the correct order for writing process How many beats does a half note get in 6/8 time? What is an example of personification?A. The cookies smell deliciousB. The trees swayed slightly.C. The wind grabbed my scarf.D. The dog barked loudly.please lmk:))