subject

JavaAssignmentFirst, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).Then create a new Java application called "BackwardsStrings" (without the quotation marks) that:Prompts the user at the command line for one 3-character string. Then (after the user inputs that first 3-character string) prompts the user for another 3-character string. Then prints out the two input strings with a space between them. Finally prints on a separate line the two input strings 'in reverse' (see example below) with a space between them. So, for example, if the first string is 'usr' and the second string is 'bin', your program would output something like the following:The two strings you entered are: usr bin. The two strings in reverse are: nib rsu. Note that the reversed SECOND string comes FIRST when printing the strings in reverse. my result/*Name: Saima SultanaLab:PA - BackwardsStrings (Group 2)*/package backwardsstrings;import java. util. Scanner;public class BackwardsStrings { public static void main(String[] args) { //variables String first, second; // TODO code application logic here StringBuilder firstReversed= new StringBuilder(); StringBuilder secondReversed= new StringBuilder(); Scanner input = new Scanner(System. in); // read strings first=input. nextLine(); second=input. nextLine(); // print out the input strings System. out. println("The two string you entered are:"+ first+" "+second+"."); // reverse the strings for ( int i=first. length()-1;i>=0; i--) firstReversed. append(first. charAt(i)); for ( int i=second. length()-1;i>=0; i--) secondReversed. append(second. charAt(i));// print out the reverse string System. out. println("The two strings in reverse are:"+secondReversed+" "+ firstReversed+ ".");}}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which task uses a simple parameter?
Answers: 1
You know the right answer?
JavaAssignmentFirst, launch NetBeans and close any previous projects that may be open (at the top me...
Questions
question
Mathematics, 19.05.2021 09:50
question
Chemistry, 19.05.2021 09:50
question
Mathematics, 19.05.2021 09:50
question
Mathematics, 19.05.2021 09:50
question
Mathematics, 19.05.2021 09:50
question
Mathematics, 19.05.2021 09:50
Questions on the website: 13722361