0% found this document useful (0 votes)
2 views1 page

Assignment Unit II Java Programming

This assignment for a Java Programming course requires students to answer questions on conditional control statements, loops, break and continue statements, arrays, and strings in Java. Students must provide explanations, examples, and diagrams where necessary. The assignment emphasizes the importance of writing answers in their own words.

Uploaded by

Nikhil Rathore
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)
2 views1 page

Assignment Unit II Java Programming

This assignment for a Java Programming course requires students to answer questions on conditional control statements, loops, break and continue statements, arrays, and strings in Java. Students must provide explanations, examples, and diagrams where necessary. The assignment emphasizes the importance of writing answers in their own words.

Uploaded by

Nikhil Rathore
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

Assignment – Unit II: Java Programming

Course: Java Programming

Unit: II

Instructions

 Answer all questions.


 Write your answers in your own words.
 Draw diagrams/examples wherever necessary.

Assignment Questions

1. Explain the different conditional control statements in Java. Differentiate between if,
if-else, and if-else-if with suitable examples.

2. What are loops in Java? Explain while, do-while, and for loop with one example each.

3. What is the purpose of break and continue statements? Explain with suitable Java
programs.

4. Define an array. Explain how to declare, initialize, and access one-dimensional arrays
in Java. Also mention the types of arrays.

5. What is a String in Java? Differentiate between mutable and immutable strings.


Explain how to create and use StringBuffer with an example.

You might also like