Skip to main content

Programming using Java Hands On - Control Structures | Print Username

 

Print Username

Jeffy, who is going to complete the higher education in this year needs to create a simple application which accept the name of a person and welcome them with a message along with their name. She wants to read the data using the class "Scanner". Implement this scenario using Java.

Sample Input 1: 

Enter the name:

Johson

Sample Output 1:

Welcome Johnson.


Sample Input 2: 

Enter the name:

Stain Polson

Sample Output 2:

Welcome Stain Polson.



 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
|  2 tests run/ 2 tests passed |
+------------------------------+
 

Comments

Must Read:

Course DH ASE B3 Slot3 Mock 1 Handson | RDBMS

DH ASE B3          Slot3              Mock 1                  Handson: RDBMS

Software Engineering Concepts Software Engineering Fundamentals Post-Quiz

  Software Engineering Concepts       Software Engineering Fundamentals            Post-Quiz

Accenture Mock Quiz | Part 4

  Question  31 Correct Marked out of 1.00 Flag question Question text What will be the output of the following Java code? class Test extends Throwable { } class Base extends Test {} public class Main { public static void main(String args[]) { try { throw new Base(); } catch(Test t) { System.out.println("Test Exception"); } finally { System.out.println("Finally block "); } } } Select one: a.  Complilation error : Bass calss can't extends Test b.  print-"Test Exception" c.  Complilation error: Test Class cant extends Throwable d.  print - "Test Exception" "Finally block "   Feedback The correct answer is: print - "Test Exception" "Finally block " Question  32 Correct Marked out of 1.00 Flag question Question text Which of the following statement(s) is/are TRUE? (i) In a non-correlated(independent) subquery, the subquery is always executed only onc...

Subscribe to Get's Answer by Email