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

OOJ-CIE 3 Updated Question Bank

The document is a question bank for the Object-Oriented Programming with Java course, specifically for CIE-3, covering various topics in Modules 4 and 5. It includes questions on thread creation, thread states, synchronization, regular expressions, string manipulation, and string buffer methods, along with lab programs for practical implementation. Each question is designed to assess understanding and application of Java programming concepts.

Uploaded by

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

OOJ-CIE 3 Updated Question Bank

The document is a question bank for the Object-Oriented Programming with Java course, specifically for CIE-3, covering various topics in Modules 4 and 5. It includes questions on thread creation, thread states, synchronization, regular expressions, string manipulation, and string buffer methods, along with lab programs for practical implementation. Each question is designed to assess understanding and application of Java programming concepts.

Uploaded by

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

Object-Oriented Programming with Java(22CSE42)

Question Bank for CIE-3


Module-4
1. Explain the mechanism of creating threads with program example.
(or)
Explain how to make the classes threadable in java with programming examples.
(or)
Explain the 2 different ways to create threads in java with programming example.

2. Explain the different states of threads with neat diagram and example.
(or)
Explain in detail about the Java Thread Model/Java thread Lifecycle with a neat
diagram and example.
3. Explain isAlive() and join() method with programming example.
4. Describe the thread priority. Explain how to assign and get the thread priorities with
example.
5. What is need of synchronization? Explain with an example how synchronization is
implemented in java.
6. Write a Java program which creates 2 threads, one thread displays “VTU-Belagavi”
for every 10 seconds and another thread displays “Karnataka” for 5 seconds
simultaneously.
7. What is Regular Expression. Explain java.util.regex package to work with regular
expressions.
8. Write a short note on Pattern and Matcher class with example.
9. Demonstrate the methods matches() and find() giving the program as example with
outputs.
10.Demonstrate the split() and replaceAll() giving the program as example with outputs.

Module-5
1. Define Strings in java. Explain all the String Constructors in Java with syntax and
example for each and a program to demonstrate the same.
2. Explain following character extraction method:
a. charAt( )
b. getChars()
c. getBytes()
d. toCharArray( )
3. Explain the following String comparison with a program.
a. equals() and equalsIgnoreCase()
b. regionMatches()
c. startsWith() and endsWith()
d. compareTo()
4. Explain how strings can be modified in Java with different methods.
(or)
Explain how to modify a string by using following methods.
a. substring()
b. concat( )
c. replace( )
d. trim( )
5. What String Buffer? Explain how it is different from String in java with an example.
(or)
Differentiate between String and StringBuffer class. Write a program to demonstrate
the same.
6. Explain the following String Buffer methods:
a. insert( )
b. append( )
c. substring( )
d. replace( ).
e. reverse()
f. length()
g. delete()
7. Write a program to remove duplicate characters from a given string and display the
resultant string.

Lab programs
1. Implementation Java program to input N no. of strings, count the number of vowels
and digits in each string using Regular Expressions. (Lab pgm 7)
2. Implement a java program to validate USN and email ID of N students using Regular
Expressions. (Lab pgm 8)
3. Implement a java program to replace all instances of a substring with another within a
string. (Lab pgm 9)
4. Implement a java program to input a string and implement monoalphabetic Cipher.
(Lab pgm 10)

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