0% found this document useful (0 votes)
4 views2 pages

Question Bank Class Test 1 JPR 2023-24

This document is a question bank for a Class Test in Java Programming for the Computer Science & Engineering program at R. C. Patel Polytechnic. It includes various questions covering topics such as string methods, constructors, garbage collection, and type conversion, with a total of 20 marks allocated. The test is scheduled for 20/02/2024 and consists of two sections with different numbers of questions to attempt.

Uploaded by

harshshinde0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Question Bank Class Test 1 JPR 2023-24

This document is a question bank for a Class Test in Java Programming for the Computer Science & Engineering program at R. C. Patel Polytechnic. It includes various questions covering topics such as string methods, constructors, garbage collection, and type conversion, with a total of 20 marks allocated. The test is scheduled for 20/02/2024 and consists of two sections with different numbers of questions to attempt.

Uploaded by

harshshinde0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

The Shirpur Education Society’s

R. C. Patel Polytechnic, Shirpur


Department of Computer Science & Engineering

QUESTION BANK CLASS TEST-I


Programme Code: Computer Science & Engg. Year/Scheme: CW-4-I Semester: Fourth
Course Title: Java Programming Course Abbr.: JPR Course Code:22412
Max. Marks:20 Duration:01 Hour Date: 20/02/2024

Q.1. Attempt any FOUR. 4 x 2 = 08M CO-UO

a) Define any four String methods.

b) State syntax of ‘for each’ version of for loop with one example.

c) Define 1) Left shift operator 2) Right shift operator

d) Define constructor.List its types.

e) Define the terms 1)elementAt() 2) addElement()

f) Define dynamic initialization and scope of variables.

Name the wrapper class methods for the following: (i) To convert string objects to
g)
primitive int. (ii) To convert primitive int to string objects.
h) State use of finalize( ) method with its syntax.

i) Define instanceof and dot (.) operators in Java.

Give following methods of string class with their syntax and suitable example.
j)
i) substring ii) replace

k) Define i) Implicit casting ii) Explicit casting

l) Enlist any two logical operators and two bitwise operators.

m) Write down the syntax of array declaration,initialization.

n) Explain any two features of Java.


The Shirpur Education Society’s
R. C. Patel Polytechnic, Shirpur
Department of Computer Science & Engineering

Q.2. Attempt any THREE. 3 x 4 =12M

a) Explain the command line arguments with suitable example.

b) Define constructor.Explain parameterized constructor with example.

Define a class circle having data members Pi and radius. Initialize and display values
c)
of data members also calculate area of circle and display it.

d) Define garbage collection in Java?Explain final method in Java

Write a Java program to implement following functions of string:


e)
i) Calculate length of string ii) Compare between strings

f) Differentiate between String and String Buffer.

g) Give any four difference between array and vector.

h) Explain any four visibility controls in Java.

i) Write a program to display ASCII value of a number 9.

j) Write a program to sort the elements of an array in ascending order.

k) Explain implicit and explicit type conversion with example in detail.

l) Explain vector with the help of example.Explain any 2 methods of vector class.

Write a program to print the sum,difference and product of two complex numbers by
m) creating a class named “Complex” with separate methods for each operation whose
real and imaginary parts are entered by user.

n) Explain switch case and conditional operator in java with suitable example.

Write a program to add 2 integer, 2 string and 2 float values in a vector. Remove the
o)
element specified by the user and display the list.
* * *Best of Luck* * *

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy