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
Slav-nsk [51]
4 years ago
6

How to do assignment 5 on edhesive please help

Computers and Technology
1 answer:
Shalnov [3]4 years ago
8 0

Answer:

//To enter a string, and enter a pivot string, and then print in required sequence, the string from pivot string to last as first string, and printed before the left portion of string.

import java.util.Scanner;

public class Main {

 public static void main(String args[]) {

   Scanner s1 = new Scanner(System.in);

   System.out.println("Enter Main String:");

   String f1 = s1.nextLine();

   System.out.println("Enter pivot(string):");

   String piv = s1.nextLine();

   int start1 = f1.indexOf(piv);

   int end1 = piv.length()+start1;

   if (start1 == -1){

     System.out.println("Error: Sub string(Pivot) cannot be found.");

     return;

   }

   String first1 = f1.substring(0,start1-1);

   String second1 = f1.substring(end1);

   if (f1.charAt(start1-1)==' '){

     System.out.println(second1 + " " + piv + " " + first1);

     return;

   }

   System.out.println(second1 + piv + first1);

   

 }

}

Explanation:

Please check the answer section

You might be interested in
Researching the history of computers is a good troubleshooting technique.<br> True or False?
Verdich [7]

Yes very much so! You could learn previous mistakes/bugs/etc and find solutions to fixing them and avoiding getting them. As well as much more. History is always a fun subject for anything, really in my opinion.

4 0
3 years ago
Kevin wants an application that will help him create a website as well as publish it. What application can he use?
AURORKA [14]

Answer:

D

Explanation:

Adobe Dreamweaver can hep him make a website and publish it.

3 0
3 years ago
If you are installing separate anti-virus and anti-spyware programs, which should you install first
Vera_Pavlovna [14]
Probably the anti virus, so you don't get a virus from downloading the anti spyware program.
6 0
3 years ago
Which HTML tag is formatted correctly?
WITCHER [35]
A: This is a heading
3 0
3 years ago
.Why are protocols important for networking?
NNADVOKAT [17]

Answer: Networking protocols are important as they define a set of rules to be used for exchanging information between computer nodes.

Explanation:

in terms of networking it is required for the source and the destination to have a set of predefined rules which enables the router to send and receive information across the network in such as way that both the ends are able to receive the messages.

The information exchange takes place first by the client by introducing itself to the remote server. the remote server upon receiving the information uses some form of handshaking and acknowledges the client of the receipt of the message.

besides this there are many routing protocols which tells us about the way how packets are sent from the client to the source. There are two types of routing protocols:

1. static routing protocols

2. dynamic routing protocols.

6 0
3 years ago
Other questions:
  • WHAT IS SQL AND HOW CAN YOU MEET THE DATA REQUIREMENTS ALSO MAINTAINING DATA INTEGRITY,AND LASTLY STATE THE FULL MEANING OF SQL
    11·1 answer
  • What is the maximum number of hosts you can have on a network if the first decimal value of the ip address is between 192 and 22
    10·1 answer
  • I need an answer fast !!! (APEX)
    13·1 answer
  • Raid level 6 is basically the same as RAID level 5, but it adds a second set of parity bits for added fault tolerance and allows
    7·1 answer
  • What is the term used for a set of programs that acts as an interface between the applications that are running on a computer an
    13·1 answer
  • When was the federal commission act put into effect?????
    13·1 answer
  • Assuming that we only support BEQ and ADD instructions, discuss how changes in the given latency of this resource affect the cyc
    7·1 answer
  • Design a function that checks if a keyword exists in a given keyword tree and returns true if so and returns false otherwise. Af
    13·2 answers
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • Copy and paste is the only way to move text from one place to another.<br><br>True or <br>False​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!