Assignment Format
Assignment Format
Assignment #1
1. Explain the key features of Java that make it a popular programming language for
enterprise applications.
2. List and describe the eight primitive data types in Java. Provide an example of each.
3. What is the difference between primitive and non-primitive data types in Java? Give
examples of each.
4. Define the different types of variables in Java. How do local variables differ from
instance variables and static variables?
5. Write a Java program that declares and initializes variables of different data types.
6. Explain the various types of operators in Java. Provide examples of arithmetic,
relational, and logical operators in a Java program.
7. Describe the purpose of control flow statements in Java. Write a Java program that
uses if-else and switch statements.
8. Compare and contrast the while, do-while, and for loops in Java. Provide examples of
each.
9. What are arrays in Java? Write a Java program to demonstrate the creation and usage
of a single-dimensional array.
10. Explain the BigInteger and BigDecimal classes in Java. Write a Java program that
performs arithmetic operations using BigInteger.