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

How to do assignment 5 on edhesive please help

Computers and Technology
1 answer:
Shalnov [3]3 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
What class of attacks use innovative attack tools and once a system is infected it silently extracts data over an extended perio
KatRina [158]

Answer:

Advanced persistent threat.

Explanation:

Advanced persistent threat is a threat actor implemented by either a government supported or private group to intrude a network or system and stays undetected, collecting information over a period of time.

It is used by cyber terrorist group to facilitate massive attacks based on the information retrieved. National or government group use the concept to promote national security.

7 0
3 years ago
Now the y0utube home screen is gone
erik [133]

Answer:

oh no thanks not good

Explanation:

did you try it on a different device mabye a phone

7 0
3 years ago
Read 2 more answers
How can i save a word 2016 document as a word 2016 document?
Lana71 [14]
Type 2016 document.pdf.files
3 0
3 years ago
Discuss the role of the concept behind the "Internet of Things (IoT)" in today's digitally connected society.
AlekseyPX

Answer:

IoT Definitions: The term Internet of Things generally refers to scenarios where network connectivity and computing capability extends to objects, sensors and everyday items not normally considered computers, allowing these devices to generate, exchange and consume data with minimal human intervention.

Explanation:

hope that helps

7 0
3 years ago
Stuff that's displayed on a web page (Has to be 7 characters) (third letter is N, and fifth letter is E) little urgent
melomori [17]

Answer:

content

Explanation:

3 0
3 years ago
Other questions:
  • If you use a surrogate key, you must ensure that the candidate key of the entity in question performs properly through the use o
    5·1 answer
  • What do you click to create a new presentation in noral view
    12·1 answer
  • What type of malicious procedure involves using sniffing tools to capture network communications to intercept confidential infor
    7·1 answer
  • Crash proof cars... do you have any idea on how to improve this idea
    13·2 answers
  • Taken together, the physical and data link layers are called the ____________________. Internet layer Hardware layer Internetwor
    15·1 answer
  • Tools, documents, language and processes—these are examples of boundary objects. Which of the following is the best definition o
    11·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • In a systems development life cycle (SDLC) model, the purpose of the _____ is to create a physical model that will satisfy all d
    10·1 answer
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • The ________ is the easy way to insert a new slide between existing slides.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!