Q1.[25 Marks] Write a program to display the following star shape using output statement and loop?
* *
* * * *
* * * * * *
* * * * * * * *
* * * * * * * * *
Q1:[30 Marks] considering the string variable S which has the value , S="The programming language is always fun to learn". Answer the following:
A. [15 Marks] Fill the blank with the most subtitle java function or answer:
1. the output S2="language" is the obtain using S2=s.substring(16,24);
2. the output 'w' is obtain using s.charAt(30);
3. the output S2="to learn" is obtain using s2=s.substring(39);
4. to find the first index of letter 'a' we use indexOf("a");
5. to find the next index of letter 'a' (the one following the first founded one) we use indexOf("a",indexOf("a")+1));