University Of Salahaddin,Software Engineering

University Of Salahaddin, Software Engineering

University Of Salahaddin,Software Engineering

University Of Salahaddin, Software Engineering

Final Examination/First Attemp 2006-2007

Q1.[25 Marks] Write a program to display the following star shape using output statement and loop?

 

*                                                              *

*      *                                              *      *

*      *      *                              *      *      *

*      *      *      *              *      *      *      *

*      *      *      *      *      *      *      *      *

 

 

DownloadDownload All questions with their answers

Final Examination/First Attemp 2007-2008

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));

 

Download  Download All problems with their result