0% found this document useful (0 votes)
268 views

CoreJAVA Practicals

The document outlines a series of Java programming tasks involving various programming concepts. It includes tasks to reverse numbers, calculate factorials with recursion, swap numbers with and without a third variable, find even/odd numbers, find min/max in arrays, calculate circle area and perimeter, use command line arguments, implement arithmetic and bitwise operators, increment/decrement operators, left/right shift operators, type conversions, generate random choices from sets, generate lottery numbers, generate random capital letter sequences excluding vowels, create and manipulate arrays of strings and decimals, create a multiplication table array, analyze and output date strings, and reverse the order of letters in words. It also lists topics for class/interface, packages, exception handling, threads,

Uploaded by

Karmik Patel
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
268 views

CoreJAVA Practicals

The document outlines a series of Java programming tasks involving various programming concepts. It includes tasks to reverse numbers, calculate factorials with recursion, swap numbers with and without a third variable, find even/odd numbers, find min/max in arrays, calculate circle area and perimeter, use command line arguments, implement arithmetic and bitwise operators, increment/decrement operators, left/right shift operators, type conversions, generate random choices from sets, generate lottery numbers, generate random capital letter sequences excluding vowels, create and manipulate arrays of strings and decimals, create a multiplication table array, analyze and output date strings, and reverse the order of letters in words. It also lists topics for class/interface, packages, exception handling, threads,

Uploaded by

Karmik Patel
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

1

PART I (Data types, Operators and Assignments, Loops, Array and String
A. Write a java program to implement following task. 1. Reverse Number using Java

2. Factorial Using Recursion 3. Swap Numbers 4. Swap Numbers Without Using Third Variable 5. Find Even Odd Number 6. Find Largest and Smallest Number in an Array 7. Calculate Circle Area 8. Calculate Circle Perimeter 9. Calculate Rectangle Area (Using Command Line Arguments) 10. Calculate Rectangle Perimeter (Using Command Line Arguments) 11. Implements all the Arithmetic operators 12. Implements Bitwise operators. 13. Implements Increment and Decrement operators 14. Implements Left-Shift, Right-Shift and Unsigned Right-Shift operators 15. Implements Narrowing and widening conversions. 16. Implements type conversion (String to all data types) B. Write a program to display a random choice from a set of six choices for fruit
(Apple, Banana, Watermelon, Orange, Pineapple)

A. A lottery requires that you select six different numbers from the integers 1 to
49. Write a program to do this for you and generate five sets of entries.

D. Write a program to generate a random sequence of capital letters that does


not include vowels

E.

Create an array of String variables and initialize the array with the names of the months from January to December. Create an array containing 12 random decimal values between 0.0 and 100.0. Display the names of each month along with the corresponding decimal value. Calculate and display the average of the 12 decimal values. F. Write a program to create a rectangular array containing a multiplication table from 1 * 1 up to 12 * 12. Output the table as 13 columns with the numeric values right- aligned in the columns. (The first line of output is the column headings, the first column with no heading, then the numbers 1 to 12 for the remaining columns. The first item in each of the succeeding lines is the row heading, which ranges from 1 to 12.) G. Define an array of ten String elements each containing an arbitrary string of the form "month/day/year"; for example,"10/29/99" or "12/5/01". Analyze each element in the array and output the date represented in the form 29th October 1999. H. Write a program that reverses the sequence of letters in each word of your chosen paragraph. For instance, "To be or not to be." becomes "oT eb ro ton ot eb."

2 3

PART II (Class, Interface) PART-III (package , Exception Handling)

4 5 6

PART-IV (Java Thread) PART-V(java I/O) PART-VI (Applet and AWT )

You might also like