I. Answer the following Questions:
1. Define the terms and how can we implement in java. [2]
(a) Data Abstraction (b) Polymorphism
2. (a) Write a java statement to create an object corona of class virus. [2]
(b) What is the importance of ‘new’ keyword while creating an object.
3. Differentiate between Class and Object. [2]
4. (a) What is Escape Sequence? Give any two Examples. [2]
5. What will be the output when the following code segments is executed? [2]
(a) System.out.println("The king said \"Begin at the beginning!\"to me");
(b) System.out.println(“Name:Daffodil\n”+”Started:14yrs\t”+”cource:ICSE and PU”);
6. What are Literals? State one difference between floating point literal and double literal. [2]
7. What are the types of casting shown in the following examples? Define each of them. [2]
double x=25.2;
int a=15;
(a) int y=(int) x; (b) long b=a;
8. Explain unary and Binary operators with an example. [2]
9. (a) √
−
3
(b) | − | + √ [2]
10. (a) Evaluate the following expression, if the values of the variables are int p,k=8,m=11,r=7; [2]
p=(r++%7)+(--m%5)+k*(++k-8)
(b) What will be the output of the following code?
int k = 5, j = 9;
k += k++ – ++j + k;
System.out.println(“k=” +k);
System.out.println(“j=” +j);
11. What are Comments? Explain different types of comments with an example. [2]
12. Name the type of error(syntax, runtime, logical) in each case: [2]
(i) Finding the square root of a negative number.
(ii) Printing the value of a variable without declaring it.
13. Give the output of the following: [2]
(a) Math.ceil(3.4) + Math.pow(2, 3);
(i) double b= −15.6; double a=Math.rint(Math.abs(b)); System.out.println(“a=” +a);
14. What are the default values of primitive data types int , float ,double and Boolean. [2]
15. Name the primitive data type in java that is: [2]
(a) A 64-bit integer and is used when you need a range of values widr than those provided by
int.
(b) A single 16-bit Unicode character whose default value is ‘\u000’.
Answers
Answered by
0
Answer:
process operations for the season to ensure a smooth
and flawless experience for both the recruiter and the student. Kindly outline the placement
process operations for the recruiter "John Jacobs."
(Hint: Please be creative in your thought process and do not restrict yourself. You can refer to the
placement season you must have participated in during your graduation/post-graduation. For
example, how you initiate the process for the recruiter step by step and for the student
parallelly.)
Similar questions