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
lutik1710 [3]
3 years ago
6

Write a method named showChar. The method should accept two arguments: a reference to a String object and an integer. The intege

r argument is a character position within the String, with the first character being at position 0. When the method executes, it should display the character at that character position. The method does not return anything. Here is an example of a call to the method: showChar("New York", 2); In this call, the method will display the character w because it is in position 2. Demonstrate the method in a complete program. Sample Run java Method_showChar Enter a line of text: The elevation of Mount Everest is 29,029 feet (8,848·in·meters)↵ Enter yourindex:3 5↵ 9↵
Computers and Technology
1 answer:
matrenka [14]3 years ago
5 0

A complete program with the method ShowCar:

import java.util.Scanner; // header file

public class ShowChar

{

public static void main(String[] args)

{

String lnOfText;

int i;

Scanner input = new Scanner(System.in);

System.out.print("Enter a line of text:");

lnOfText = input.nextLine();

System.out.print(" Enter your index: ");

i = input.nextInt();

show_Char(lnOfText,i);

}

public static void show_Char(String str_a, int i)

{

System.out.print(str_a.charAt(i));

}

}

In this program, both the inputs ie. a sentence or line of text as well as the index position is obtained. A method is written to find the string at that particular position. Finally the method prints that character at the particular index.

You might be interested in
Another method that might be desired is one that updates the Student's number of credit hours. This method will receive a number
statuscvo [17]

Answer:

Option d is the method

Explanation:

public void update Hours(int more Hours)

{

hours += more Hours;}e. public int update Hours(int more Hours){return hours + more Hours;

}

5 0
3 years ago
a data tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patter
Mashcka [7]

Text mining tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

Here's the complete question:

__________ tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

- OLAP

- Text Mining

- Web mining

- Web content mining

What is Text mining?

Text mining is the process of exploring and analyzing large amounts of unstructured text data aided by software that can identify concepts, patterns, topics, keywords and other attributes in the data.

Learn more on Text mining from:

brainly.com/question/25578967?referrer=searchResults

#SPJ4

6 0
1 year ago
Which of these is an example of output?
Arada [10]

Answer:

using a mouse I believe we'll it's the common answer

8 0
3 years ago
Read 2 more answers
Donde veo haikyuu en español sin lag ni virus :C (la segunda, tercera y cuarta temporada)
Mars2501 [29]

Answer:

keep in English language

Explanation:

keep in English

3 0
2 years ago
What is the framing guideline for photography?
mamaluj [8]
Framing is basically a perimeter around your photo that makes you focus on one spot and example of this would be taking a picture somebody through a hole in the wall or even having curtain draped around the outside of a photo
5 0
3 years ago
Other questions:
  • Marijuana and hashish come from the hemp plant?
    10·1 answer
  • Mike is reading about machine-dependent programming languages. Which languages are machine-dependent programming languages?
    11·1 answer
  • what is happening when humans control the breeeding of living things to favor certain desired features
    9·1 answer
  • QUESTION 16
    14·1 answer
  • When you touch a hot stove, along which pathway will the impulses travel and what is the final destination in the cns?
    12·1 answer
  • Alexi is writing a program which prompts users to enter their age. Which function should she use?
    6·2 answers
  • Explain the working principle of computer? can anyone tell​
    14·1 answer
  • What types of activities are ideal for a robot to perform?
    6·1 answer
  • 7. Suppose that a RISC machine uses 5 register windows. a. How deep can the procedure calls go before registers must be saved in
    14·1 answer
  • Which word did alexander graham bell want adopted as a telephone greeting instead of hello.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!