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
adell [148]
3 years ago
11

Write a function named delete Letter that has 2 parameters. The first parameter is a string, the second parameter is an integer.

The function removes the character located at the position specified by the integer parameter from the string. For example, if the function is being called with the following statement: deleteLetter ("timetable", 3); the string will become "tietable", where the third character, 'm' has been removed.
Computers and Technology
1 answer:
Serjik [45]3 years ago
4 0

Answer:

//import package

import java.util.*;

// class name

class Solution

{

// method to remove the character at given index

public  static void deleteLetter(String st,int in)

{

// remove the character at index in

 st=st.substring(0,in-1)+st.substring(in);

 System.out.println(st);

}

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

//scanner object to read input

   Scanner scr=new Scanner(System.in);

// read string

   System.out.print("Enter the string:");

                    String st=scr.nextLine();

// read index

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

  int in=scr.nextInt();

// call method

  deleteLetter(st,in);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read a string with the help of Scanner object.Then read the index of character to be remove.Call the method deleteLetter() with parameter string and index.It will make substring from 0 to "in-1" and "in" to last of the string.Then add both the string.This will be the required string.

Output:

Enter the string:timetable

Enter the index:3

tietable

You might be interested in
Programming hooks, or guidelines, published by firms that tell other programs how to get a service to perform a task such as sen
RideAnS [48]

Answer:

"Application programming interface(API)" is the correct answer for the above question.

Explanation:

  • API is an interface which is used to call the different software in the currently developing software by the developer to inbuilt some task of that software.
  • The full of this is the Application programming interface. It is an interface or guidelines which are used to tell the other software, that how a particular service is performed.
  • The above concept is asked by the above question. so the answer is API.
4 0
3 years ago
Choose the 3 Points in good story telling
Sidana [21]

Answer:

1.Choose a clear central message 2. Embrace conflict 3.Have a clear structure  

Explanation:

8 0
2 years ago
What game is the best for racing and modifying cars
sleet_krkn [62]

Answer:  it is Forza Horizon 4. ...

Best Car Games

1.Forza Horizon 4

2. Grand Theft Auto V

3. Need For Speed Payback

4. Car Mechanic Simulator

5. Forza Horizon 4

6. Rocket League

Explanation:

6 0
2 years ago
In 1–2 sentences, describe how you would create a border around a group of cells
iragen [17]
Pick one of the cells you<span> want to format and then click the down arrow beside the </span>Borders<span> button in the Font </span>group<span> on the Home tab. A drop-down menu comes up with all the</span>border<span> options that </span>you can<span> apply to the </span>cell<span> selection</span>
4 0
3 years ago
Read 2 more answers
A measure of the goods and services produced using labor and property in the U.S.
andrew-mc [135]
Hi, could you reply with the full question? 
7 0
3 years ago
Other questions:
  • Why is it important to increase componentization and standardization?
    8·1 answer
  • 52.
    11·1 answer
  • Microprocessors can’t directly understand programming languages, so programs have to be converted into _____________ that corres
    15·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • If your machine is not used as a server and is not on a local network, what packet-filtering strategy should you use?A. Block al
    12·1 answer
  • Suppose you're currently completing an examination online. When you're finished, you click on Reset Exam. Why would you do this?
    8·1 answer
  • ____ testing is a straightforward testing technique that looks for vulnerabilities in a program or protocol by feeding random in
    6·1 answer
  • Excel files have a default extension of ?
    12·1 answer
  • In addition to developing sketches, computer-aided design programs are used by fashion designers to perform which task?
    10·1 answer
  • If your computer is frozen what is something you would do to troubleshoot the problem ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!