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

Java

Uploaded by

gigone4179
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Java

Uploaded by

gigone4179
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Name :- Aajad Yadav

Roll No. 12

1. Display a message

2. Sum of two numbers


3. Effects of print() and println() methods and backslash codes
4. Display a binary number in other number systems
5. Effects of various bitwise operators
6. Test if a number is positive or negative

7. Display numbers from 1 to 10 using do...while loop


8. Rewrite previous program using while loop
9. Display numbers from 1 to 10 using for loop
10. Display numbers from 1 to 10 using infinite for loop
11. Display stars in a triangular form
12. Using for-each loop to retrieve elements from an array
13. Switch statement depending on color value
14. Come out of switch block after executing a task
15. Using string in a switch statement

16. Use a break statement to go to the end of a block


17. Display numbers in descending order using for loop
18. Using nested loops to display i and j values
19. Return a value from a method
20. Demonstrating return statement in main() to terminate the application

21. Accepting and displaying a character from the keyboard


22. Accepting a name (string) from the keyboard
23. Accepting an integer from the keyboard

24. Accepting a float number


25. Accepting and displaying employee details
26. Accepting and displaying employee details
27. Accepting different types of input in a single line
28. Performing arithmetic operations on given numbers
29. Testing if a year is a leap year
30. Generating Fibonacci numbers

31. Reading different types of data separated by space using Scanner class
32. Using printf() in Java
33. Using format() method for formatted output
34. Creating a 1D array, reading elements, and displaying them one by one
35. Accepting student marks in a 1D array and finding total and percentage
36. Sorting an array using bubble sort technique
37. Displaying a 2D array as a matrix
38. Transposing a matrix
39. 3D array for department-wise student marks
40. Displaying command line arguments
41. Adding two numbers using command line arguments
42. Creating a Jagged Array

43. Java Program to Demonstrate String Methods


44. Copying Characters Using getChars()
45. Splitting a String
46. Comparing Two Strings

47. String Immutability Test


48. Searching for a String in an Array
49. Using StringBuffer Methods

50. Palindrome Check


51. Person Class and Hash Code
52. Calling the talk() Method

53. Initializing Variables in Demo Class


54. Initializing Variables in the Person Class
55. Default Constructor

56. Parameterized Constructor


57. Understanding Methods in a Class
58. Accepting Command Line Arguments

59. Method without Parameters and without Return Type


60. Method without Parameters but with a Return Type
61. Method with Two Parameters and a Return Type

62. Static Method that Accepts Data and Returns Result


63. Testing Static Method Access to Static Variables
64. Using an Instance Variable in a Test Class

You might also like