Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

String dataFields and character replaceChar are read from input. Assign converted DataFields with a copy of dataFields where all occurrences of character '#' are replaced

String dataFields and character replaceChar are read from input. Assign converted DataFields with a copy of dataFields where all occurrences of character '#' are replaced with replaceChar. Ex: If the input is: Abe#Abe#Tia#Fay#Zoe then the output is: Abe. Abe.Tia. Fay. Zoe 3 public class ReplaceCharacters { 45 6 7 8 9 10 11 12 13 14 15 16 17 } public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String dataFields; char replaceChar; String convertedDataFields; } dataFields scnr .nextLine(); replaceChar = scnr.next().charAt(0); Your code goes here */ System.out.println(convertedDataFields)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions