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
The process of executing a program is also called ________.
irga5000 [103]
It is also called running it.  Hope this helps!!!
5 0
3 years ago
Write a class named Taxicab that has three **private** data members: one that holds the current x-coordinate, one that holds the
Licemer1 [7]

Answer:

See explaination

Explanation:

class Taxicab():

def __init__(self, x, y):

self.x_coordinate = x

self.y_coordinate = y

self.odometer = 0

def get_x_coord(self):

return self.x_coordinate

def get_y_coord(self):

return self.y_coordinate

def get_odometer(self):

return self.odometer

def move_x(self, distance):

self.x_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

def move_y(self, distance):

self.y_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

cab = Taxicab(5,-8)

cab.move_x(3)

cab.move_y(-4)

cab.move_x(-1)

print(cab.odometer) # will print 8 3+4+1 = 8

7 0
3 years ago
What are comments meant to do?
docker41 [41]
Comment<span> (computer programming) ... In computer programming, a </span>comment<span> is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.</span>
8 0
3 years ago
Write a full class definition for a class named Counter, and containing the following members: A data member counter of type int
vfiekz [6]

// making the class

class Counter {

int counter;

int limit;

// Constructor

Counter(int a, int b){

counter = a;

limit = b;

}

// static function to increment

static increment(){

if(counter<limit)

nCounter+=1;

}

// Decrement function

void decrement(){

if(counter>0)

nCounter-=1;

}

int getValue(){

return counter;

}

static int nCounter;

int getNCounters(){

return nCounter;

}

};

// Initializa the static

int Counter::nCounter = 0;

4 0
4 years ago
The undo function allows the user to cancel up to _____ previous typing actions.
GalinKa [24]
C 20 previous typing actions
4 0
3 years ago
Other questions:
  • Describe the best way to deal with a difficult co-worker?
    13·2 answers
  • The main purpose of a service panel in a house is to
    11·1 answer
  • Assuming outFile is a file stream object and number is a variable, which statement writes the contents of number to the file ass
    13·1 answer
  • A ________ is a question you ask about data stored in a database
    9·1 answer
  • 5. An entrepreneur who continues to find new and better ways of doing things is ____.
    10·1 answer
  • If you have 60fps on your laptop tell me one way you can go to 240fps
    14·2 answers
  • GIVING OUT BRAINLIEST AND I AM ALSO WARNING EVERYONE TO NOT ANSWER A BUNCH OF rubbish just to get the points!
    7·2 answers
  • How do you mark the brainiest?
    8·2 answers
  • Identify the true statements about the approach to privacy around the world. a. Uncertainty concerning the nature, extent, and v
    11·1 answer
  • owever, sitting in a corner of the store, a hacker had just set up an open "rogue" wireless hotspot posing as the coffee shop’s
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!