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
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
lbvjy [14]

Answer:  you can say  or talket to them why or how

Explanation:

4 0
3 years ago
Read 2 more answers
_____ can be used to convert digitized documents into ASCII (American Standard Code for Information Interchange) text that can b
solniwko [45]

Answer:

Optical Character Recognition

Explanation:

Optical Character Recognition is a method that is used to read character and bar codes. They convert scanned image into digital format. In other words ASCII text can be formed when a digitized document is converted.OCR is a method that convert document into word.

Here are some OCR tools which convert digitized format into machine readable text.

  • Microsoft Document
  • Microsoft One Note

8 0
3 years ago
Which phone has the most GB (Gigo Bites)<br><br>A.Samsung<br>B.Iphone<br>C.LG<br>D.ZTE
Lina20 [59]
It's GigaBytes actually. And is it RAM or storage capabilities?

And also those are brands. Not models. For example, Samsung has different phones. Not just one.


7 0
3 years ago
Read 2 more answers
In order to use SliIn order to use Slicers to filter some data, what must you first do to that data?cers to filter some data, wh
lakkis [162]

Answer:

<em />

<em>Splicers provide buttons that you can click to filter tables, or PivotTables. In addition to quick filtering, slicers also indicate the current filtering state, which makes it easy to understand what exactly is currently displayed animation</em>

<em />

8 0
3 years ago
Two technicians are discussing fully charged battery voltage readings. technician a says that it should read approximately 12.6v
Veronika [31]

I prefer to choose the technician A. It should read approximately 12.6V. Volts is the basic unit used to measure voltage and I think the technician B stating the mv units in her reading comes from the units of his multitesters setting.

3 0
3 years ago
Other questions:
  • Literacy is best defined as knowing how to: (Points : 1)
    7·2 answers
  • What is the name of the feature that can be enabled on slower-speed WAN links to prevent a large data transfer from affecting th
    10·1 answer
  • Alkane is a Variety of which fruit
    6·1 answer
  • Explain the third <br> generation
    6·1 answer
  • The Next Einstein Initiative and the ________ Institute for Mathematical Sciences bring bright young learners and the best lectu
    7·1 answer
  • 50 POINTS &amp; A FOLLOW!
    11·2 answers
  • A cable that connects the computer to the printer is an example of<br> A.hardware<br> B.software
    13·2 answers
  • Information about hardware engineers?
    9·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • A(n) _______ attack attempts to make a server or network unavailable to serve legitimate users by flooding it with attack packet
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!