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
Novosadov [1.4K]
3 years ago
12

Public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -> System.out.println(nam

e); String name1 = name.toUpperCase(); Runnable r2=() -> System.out.println(name1); r1.run(); } }
What is the output of the above program?
Computers and Technology
1 answer:
tatuchka [14]3 years ago
6 0

Answer:

Concept: Programming

  1. You take a string as an input, and you output the result which is a user defined name.
  2. Then you take that name and turn all the strings to uppercase in name and return that result.
  3. Rate brainlist
You might be interested in
In a linux script, the line ____ is important because it identifies the file as a script.
igor_vitrenko [27]
The closest line to that would be the first line:


#!/bin/bash

echo "Hello World!"


BTW, the "#!" is referred to as a she-bang. When those are the first characters executed, the (requires an absolute path) program that follows is launched, and the rest of this file is given to it as data. To run this like a program, the execute permissions need to be set ( chmod 0755 script.sh ).
8 0
3 years ago
XML Schemas consist of:
Contact [7]
None of the above is correct

4 0
3 years ago
Refer to the image below. The portion of the letter labeled 5. is the ___________________
Salsk061 [2.6K]

Refer to the image below.

WHERE IS THE IMAGE!!!!

6 0
3 years ago
Read 2 more answers
Select the three business advantages of globalization.
Anna007 [38]

Answer:

There is increased collaboration in problem solving.

There are increased business opportunities.

It facilitates ease in communication

4 0
3 years ago
Write a program which promptsuser to enter an integer value. Using while loop print the valuesfrom
tino4ka555 [31]

Answer:Following is the c++ code for the problem:

#include <iostream>

using namespace std;

int main() {

   int number;

   cout<<"Enter the number"<<endl;

   cin>>number;

   int i=0,c=0,odd[500];

   while(i<=number)//loop for printing the numbers form 0 to number.

   {

       cout<<i<<" ";

       if(i%2!=0)// storing in the odd array if the number is odd.

       {

           odd[c++]=i;//storing odd numbers..

       }

       i++;

   }

   cout<<endl;

   i=0;

   cout<<"The odd numbers are "<<endl;

   while(i<c)//loop to print the odd numbers.

   {

       cout<<odd[i]<<" ";

       i++;

   }

   cout<<endl<<"The prime numbers are "<<endl;

   i=0;

   int sum=0;

   

   while(i<c)//loop to print the prime numbers..

   {

       int div=2;

       while(div<odd[i])

       {

           if(odd[i]%div==0)

           break;

           div++;

       }

       if(div==odd[i])

      {

           cout<<odd[i]<<" ";

           sum+=odd[i];//updating the sum..

      }

       i++;

   }

   cout<<endl<<"The sum of odd prime numbers is "<<sum<<endl;//printing the sum..

return 0;

}

Output :

Enter the number

49

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49  

The odd numbers are  

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49  

The prime numbers are  

3 5 7 11 13 17 19 23 29 31 37 41 43 47  

The sum of odd prime numbers is 326 .

Explanation:

First I have printed the values from 0 to n and i have taken an array to store odd numbers.After that i have printed the odd values.And after that i have printed prime numbers among the odd numbers and their sum. These all operations are done using while loop.

6 0
3 years ago
Other questions:
  • What is looping? the rerecording of sound first recorded on set the recording of sound on set the process of combining different
    11·1 answer
  • A person who has a been exposed to technology at a young age is?
    8·1 answer
  • .doc What is the difference between a skilled hacker and an unskilled hacker, other than skill levels? How does the protection a
    5·1 answer
  • How would you define media literacy?
    12·1 answer
  • Cameron is having a party and needs to write step-by-step directions on the invitation. Which type of list would you
    11·1 answer
  • EMERGENCYYYYY what does it mean when i get a security alert when i download an addon on google docs
    7·1 answer
  • From Blown to Bits why is it important to know what children are doing on the Web Tonight?
    7·1 answer
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    9·1 answer
  • How to write conclusion of hard disk​
    11·1 answer
  • he memory protection requirement must be satisfied by the operating system rather than the processor. True False
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!