CS-74 Introduction To Internet Programming Dec.2004
Question Paper of CS-74 Introduction To Internet Programming Dec.2004
Ql(a) Why is Java platform independent ? Explain two advantages of Java independency.
(b) Explain why main method of any Java program is always static. Your explanation should include all the properties of any static method.
© Write a program in Java to print the following pattern for a given input n = 5.
Number = 1 Sum = 1
Number = 2 Sum = 3
Number = 3 Sum = 6
Number = 4 Sum = 10
Number = 5 Sum = 15
(d) Explain three uses of final keyword with the help of suitable example for each,
(e) What are the different data types available in Java ? Explain the need of various data types.