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 10:30
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
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
Chemistry, 28.01.2021 19:20
question
Health, 28.01.2021 19:20
question
Mathematics, 28.01.2021 19:20
question
Social Studies, 28.01.2021 19:20
Questions on the website: 13722360