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
wlad13 [49]
2 years ago
5

Given that String[] str has been initialized, to get a copy of str[0] with all characters converted to upper case, use the follo

wing statement:
a. str[0].toUpperCase();
b. str.toUpperCase();
c. str[0].UpperCase();
d. str.UpperCase();
Computers and Technology
1 answer:
Strike441 [17]2 years ago
7 0

Answer: str[0].toUpperCase();

Explanation:

str[0] is pointing to the first character of the entire string and the code str[0].toUpperCase() will convert the characters to upper case if they are in lowercase and will remain unchanged if they are already in upper case.

You might be interested in
On the classic gameshow The Price Is Right, contestants must guess the price of an object (guesses are distinct). The winner is
Kruka [31]

Answer:

The program code is in explaination

Explanation:

Program code below.

def judge(auction,price):

"""

Function: Returns Name who auctioned very near to give price

Input :

auction : list of tuples

price : auction price

output: returns name of best auction amount holder

"""

diff = [] #storing differences between auctionist amount and price

count = 0

for each_pair in auction:

if each_pair[1]<=price:

diff.append(price-each_pair[1])

else:

count+=1

diff.append(each_pair[1])

if count == len(auction): #check for if no one have auctioned good amount

return None

else:

more_possibility_index = diff.index(min(diff)) #finding index of best amount from diff list

return auction[more_possibility_index][0]

auction = [('Alice',430),('Bob',538),('Carol',487),('David',550)]

price = 520

print(judge(auction,price))

I kept the output at the attachment.

3 0
2 years ago
Program 7 - Circle You write ALL the code, then run it - Produce the correct output. Turn in code and screen print of successful
fgiga [73]

Answer:

Here is the Circle class:

public class Circle {   // class definition

private int radius;    // private data member of type int of class Circle named radius that stores the value of radius

public Circle(int r) {   // parameterized constructor of class Circle that takes radius as argument

 radius = r;  }    // sets value of radius as r

public int getRadius() {   // accessor method to get the value of radius

 return radius;  }   // returns the current value of radius

public int Diameter() {   // method to compute diameter of a circle

 return radius * 2;  }   // multiply radius value by 2 to compute diameter of Circle

 

public double Area() {   // method to compute area of a circle

 return Math.PI  * Math.pow(radius, 2);   }   //the formula of area is

π x radius² where value of π is get using Math.PI

 

 public double Circumference() {   // // method to compute circumference of a circle

 return 2* Math.PI * radius;   }   }  //the formula of circumference is

2 x π x radius where value of π is get using Math.PI

Explanation:

Here is the Main class:

import java.util.Scanner;  //to accept input from user

public class Main {  //definition of Main class

public static void main(String[] args) {  //start of main method

   

    Scanner scanner = new Scanner (System.in);  //creates Scanner object to take input from user

    System.out.println("Enter radius: ");  //prompts user to enter radius

    int r = scanner.nextInt();  //reads the value of radius from user

 Circle c = new Circle(r);  // calls Constructor of Circle passing r as argument to it using the object c of class Circle

 

    if(c.getRadius()<=0){  //calls getRadius method to get current value of radius using objec and checks if this value (input value of r ) is less than or equal to 0

        System.out.println("Error!");   }  //when above if condition evaluates to true then print this Error! message

    else {  //if the value of radius is greater than 0

System.out.println("the radius of this Circle is: " +c.getRadius());  //calls getRadius method to return current value of r (input value by user)

System.out.println("the diameter of this Circle  is: " + c.Diameter());  //calls Diameter method to compute the diameter of Circle and display the result on output screen

System.out.printf("the circumference of this Circle  is: %.2f", c.Circumference());  //calls Circumference method to compute the Circumference of Circle and display the result on output screen

System.out.println();  //prints a line

System.out.printf("the Area of this Circle  is: %.2f", c.Area()); } }  }

//calls Area method to compute the Area of Circle and display the result on output screen

The program and its output is attached.

7 0
3 years ago
A(n) _______ attack attempts to make a server or network unavailable to serve legitimate users by flooding it with attack packet
malfutka [58]

Answer:

DoS or Denial of Service

Explanation:

Have a nice day! :)

3 0
2 years ago
WILL GIVE BRAINLIEST!! 20 PNTS!!
kirill [66]

Answer:

B :)

Explanation:

.........

3 0
2 years ago
Read 2 more answers
You can view the existing Access Control Lists for a set of folders on a Windows system by right-clicking the folder you want to
NikAS [45]

Answer:

And clicking the security tab option.

Explanation:

Lets explain what an object's ACL is. I will use an example to best explain this. Let's suppose that user Bob would want to access a folder in a Windows environment. What supposedly will happen is that Windows will need to determine whether Bob has rights to access the folder or not. In order to do this, an ACE with the security identity of John will be created. These ACEs are the ones that grant John access to the folder and the ACLs of this particular folder that John is trying to access is a list of permissions of everyone who is allowed to access this folder. What this folder will do is the to compare the security identity of John with the folders ACL and determine whether John has Full control of the folder or not.

By right clicking the folder and selecting the security tab, John will be in a position to see a list of the permissions (ACLs) granted to him by the folder.

3 0
2 years ago
Other questions:
  • What CLI command can be issued in CentOS 7 to help you to see every "hop" that a connection makes, including all of the switches
    13·1 answer
  • Find the cell address of first column and last row some one pls answer :'(​
    9·1 answer
  • You want to discard your old computer and want to securely erase the data from your hard drive. What can you use to do this and
    6·1 answer
  • Which option will Joan use to get a glimpse of how her presentation will look when she presents it to her audience? Joan will us
    14·2 answers
  • What is Napoleon's friend's full name? From the Napoleon Dynamite movie.
    9·2 answers
  • Which one of these do you need to become president of the US ?
    6·2 answers
  • I need the answer ASAP. I’ll mark brainliest if right
    5·1 answer
  • Why do computers use binary code?
    12·2 answers
  • Bonjour ma question est: expliquer comment fonctionne une calculatrice qui ne contient pas une pile. Pouvez-vous m'aider?
    12·1 answer
  • Mario is designing a page layout for a sports magazine, and he decides to add the image of a cyclist. Which principle of page la
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!