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
How to build a communication network
FromTheMoon [43]

Answer:

In Building a network, it's important you plan and build one that's appropriate for your business needs.

Explanation:

<u> </u><u>Building a Communication Network </u>

In Building a network, it's important you plan and build one that's appropriate for your business needs.

To start building a network, you must first define your network requirements. These describe why you need a network, how it will be used and enable you to establish some priorities.

Once you've defined your network requirements, you can use these to create a specification for your network.  

<u>You'll need to answer a few key questions: </u>

- Do you need a server? A network server is a powerful computer at the heart of your network, installed on-site. It provides strong control and enables you to run centralized software such as customer relationship management systems. However, it also increases the cost and complexity of your network, and cloud services are now the default for most companies.

- Wired or wireless? Wired networks are fast and reliable, but require cables to be run throughout your premises.

Wireless is versatile, but sometimes less reliable. Many companies use a mix; cables to static computers at desks and wireless for smartphones, tablets and ad-hoc access in meeting rooms.

- What internet connection do you need? A standard fibre broadband connection is usually suitable for smaller companies with up to 30 employees. Larger companies may need a faster, more expensive connection such as a leased line. Don't skimp on your internet connection, particularly if you intend to use cloud computing services or VoIP services.

- How will you keep your network secure? It's very important you take key security precautions to protect your network from hackers, viruses and other online threats.

- Do you need extra software? A network is more than the equipment that links your computers together. In addition to any on-site server operating system, you may also need network security software and a device management solution.

 

<u>Typical IT networks </u>

- A cloud-hosted network, suitable for a small and medium sized business which uses a combination of Software as a Service apps, remote file storage and hosted email. For such networks, the only hardware required on-site would be user devices and a router capable of connecting to the internet.

- A basic network, suitable for a small company with five devices, might simply link the five devices wirelessly, without a central server. This would enable everyone to use the internet and share files. You could set up a network like this for £100 or less.

- An intermediate network might consist of 15 devices, connected by cables. An entry level server would create shared file storage and allow important files to be safely backed up. The company could also run a basic, centralized customer database. A network like this could cost around £2,000.

- An advanced network might include 30 devices and a powerful server, connected by cables. The server would enable the company to run its own intranet, customer relationship management system and collaboration software. A number of shared printers could also be installed, and wireless access offered in common areas and meeting rooms. A network like this could cost £5,000 or more.

<u> Buying equipment and building an IT network </u>

- If you decide to head down the route of building your own IT network, you'll need to purchase the equipment required and install it on your premises. This job can be physical and fiddly, so get help from your IT supplier if you lack the necessary experience within your company.

- Installing cables is usually the first task. It can also cause the most disruption. Then it's usually a matter of plugging everything in, setting up your server (if you have one) and installing any other necessary software.

NOTE: You should be able to set up a simple network without having to delve too deeply into complicated settings. However, setting up a server is particularly tricky, and must be done correctly to keep your data safe from hackers. If you don't have experience of server management, leave it to the experts.

5 0
3 years ago
Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
Tresset [83]

Carlos Should use a Security Camera to keep track of his physical hardware. Carlos can then use a computer to monitor the security cameras.

7 0
3 years ago
Read 2 more answers
Which type of hazzard are those substances which threathen you physical safety ?​
vovikov84 [41]

Answer:

98o

Explanation:

4 0
3 years ago
Where will the CPU store data for easy access and quick retrieval during these computations?
zalisa [80]
CPU's have little storage devices on the CPU called registers.
4 0
3 years ago
Is this correct? I say its B, but my friend says its D.
kari74 [83]

Answer:

b

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Edmund wants to visit his university's website. Which software application would he use?
    14·1 answer
  • If a disk drive has 8 surfaces and there are 1024 tracks per surface with 256 sectors per track and 512 bytes/sector. What is th
    9·1 answer
  • Java allows you to declare methods with the same name in a class. this is called
    10·1 answer
  • In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Call the f
    12·1 answer
  • Three business partners are forming a company whose name will be of the form "name1, name2 and name3". however, they can't agree
    13·1 answer
  • 4. Why does Hancock believe that our communication online is more honest than we might<br> expect?
    15·2 answers
  • What principle of animation helps facial features to be noticed?
    7·2 answers
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
  • Given a list of integers. find the size of the list
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!