Question: (a) Write a java program to create a string array which accepts any number of student names using Scanner() method, then print the length of
(a) Write a java program to create a string array which accepts any number of student names using Scanner() method, then print the length of each given name, as shown in Figure 2.
Figure 2: Sample output
(15 marks)
(b) Write a Java program to create a simple java GUI of size (200x150 pixel). The GUI should contain TWO (2) panels, namely Panel_1 and Panel_2. Panel_1 should be with yellow background and contains TWO (2) buttons, named as Button1 and Button2, and Panel_2 should be with blue background and contains TWO (2) buttons, named as Button3 and Button4.
(10 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
