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/ 1
CLASS: XII INFORMATION TECHNOLOGY (802)
DATE: JAVA PROGRAMMING
1. Find errors in Java code snippets and correct them: java public class ErrorExample { public static void main(String[] args) { int num1 = "10"; int num2 = 20; int sum = num1 + num2; System.out.println("Sum: " + sum); } }
2. Write a Menu-driven program to perform string operations using Switch.
Write a Java program that displays a menu with options for converting a string to uppercase, lowercase, finding its length, and reversing it. Depending on the user's choice (1 for uppercase, 2 for lowercase, etc.), perform the corresponding operation on a string entered by the user.
3. Write a Program to Calculate the Product of Two Numbers using a user-defined method. (Method name: `productOf2Numbers`)
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More