[go: up one dir, main page]

0% found this document useful (0 votes)
28 views12 pages

Daily Task Sheet

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)
28 views12 pages

Daily Task Sheet

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
You are on page 1/ 12

Variables and Operators

1. Calculate minutes in a day.


2. Calculate Microseconds in a day.
3. Fibonacci Series in Java
4. Prime Number Program in Java
5. Palindrome number/name Program in Java
6. Factorial series Program in Java
7. The length and breadth of a rectangle are 5 and 7 respectively. Write a
program to calculate the area and perimeter of the rectangle.
8. Write a program to calculate the perimeter of a triangle having sides of length
2,3 and 5 units.
9. Write a program to add 8 to the number 2345 and then divide it by 3. Now,
the modulus of the quotient is taken with 5 and then multiply the resultant
value by 5. Display the final result.
10. Write a program to print the power of 7 raised to 5.
11. Assign values of variables 'a' and 'b' as 55 and 70 respectively and then
check if both the conditions 'a < 50' and 'a < b' are true.
12. Now solve the above question to check if at least one of the conditions 'a <
50' or 'a < b' is true.
13. If the marks of Robert in three subjects are 78,45 and 62 respectively (each
out of 100 ), write a program to calculate his total marks and percentage
marks.
14. Suppose the values of variables 'a' and 'b' are 6 and 8 respectively, write two
programs to swap the values of the two variables, the first program by using a
third variable
15. Second program without using any third variable.
16. Java Program to check if a number is positive or negative.
17. Java Program to check whether a number is even or odd.
18. Java Program to find Largest of three numbers using Ternary Operator
19. Write down the multiplication table of 5.
20. Write a program to reverse a 3-digit number. E.g.-Number: 132.
21. Write a program to calculate the sum of the digits of a 3-digit number.
22. Write a program to calculate the sum of the first and the second last digit of a
5 digit. E.g.- NUMBER: 12345.
23. Make a Calculator using Switch.
24. Write a program to make a Calculator.
25. Write a program to print a pyramid of star
*
* *
* * *
26. Write a program to print a reverse pyramid of star
27. Write a program to print diamonds of star
28. Write a program to print the pyramid of number 1234.
29. Write a program to print a pyramid of palindrome numbers
(12321..1234321..etc)
30. Write a program addition of matrices.
31. Write a program multiplication of matrices.
32. Write a program subtraction of matrices.
33. Write a program to find the average of three numbers.
34. Write a program to find simple interest.
35. Write a program using bitwise operators.
36. How to read and print an integer value in java.
37. Java program to multiply two floating-point numbers.
38. Java program to add two complex numbers.
39. Java program to find if a given year is leap year.
40. Java program to merge two arrays.
41. Java program to check whether the character is vowel or consonant.
42. Java program to create a class and object example.
43. Java program of basic school management.
44. Java program of shop goods name and discount example.
45. Using inheritance vehicle details program in java.
46. Program to print 2 diamonds side by side.
47. Program to print 2 diamonds one after another.
48. Program to print number diamond 1 212 32123 4321234 543212345.

IF ELSE STATEMENTS.

49. Suppose that score is a variable of type double. Write the java statement that
increases the score by 5 marks if score is between 80 and 90
50. Write a java statement that prints true if x is an odd number and positive
51. Write a java statement that prints true if both x and y are positive numbers
52. Write a java statement that prints true if x and y have the same sign (-/+)
53. Write the java statement that assigns 1 to x if y is greater than 0
54. Take values of length and breadth of a rectangle from the user and check if it
is square or not.
55. Take two int values from the user and print greatest among them.
56. A shop will give a discount of 10% if the cost of the quantity purchased is
more than 1000.

Ask user for quantity

Suppose, one unit will cost 100.

Judge and print total cost for the user.

57. A company decided to give a bonus of 5% to the employee if his/her year of


service is more than 5 years.

Ask users for their salary and year of service and print the net bonus amount.

58. A school has the following rules for the grading system:

a. Below 25 - F

b. 25 to 45 - E
c. 45 to 50 - D

d. 50 to 60 - C

e. 60 to 80 - B

f. Above 80 - A

Ask the user to enter marks and print the corresponding grade.

59. Take input of age of 3 people by the user and determine oldest and youngest
among them
60. A student will not be allowed to sit in an exam if his/her attendance is less
than 75%.

Take the following input from the user

Number of classes held

A number of classes attended.

And the print

percentage of class attended

Is the student allowed to sit in the exam or not?

61. Ask user to enter age, sex ( M or F ), marital status ( Y or N ) and then using
following rules print their place of service.

If the employee is female, then she will work only in urban areas.

if employee is a male and age is in between 20 to 40 then he may work in


anywhere

If the employee is male and age is between 40 t0 60 then he will work in


urban areas only.

And any other input of age should print "ERROR".

Searching & Sorting:


62. Java program of linear search.
63. Java program of binary search.
64. Java program of bubble sort.
65. Java program of selection sort.

Basic program:

66. Java program to concatenate two strings.


67. Java program of farm management.
68. Java program to check GPA.
69. Java program to check NCR and NPR.
70. Java program to compute electricity bills.
71. Java program to count syllables.
72. Java program of First and Last Concat.

Java Date Time,Calendar Exercise:


73.write a java program to create a date object using the calendar.
74.write a java program to get and display information year,day,hour,minute of a
default calendar.
75.write a java program to get the maximum value of the year ,month,week,date from
the current date of a default calendar.
76. Write a java program to get the minimum value of the year ,month,week,date from
the current date of a default calendar.
77. Write a java program to get the current time in new york.
78. Write a java program to get the current full date and time.
79. Write a java program to get the last day of the current month.
80. Write a java program to get the last date of the month.
81. Write a program to calculate the first and last day of each week.
82. Write a program to calculate the first and last day of the month.
83.write a java program to get the current local time.
84.write a java program to get a date after 2 week.
85.Java Program to determine whether two strings are the anagram. ex:- to check grab
and brag contains thme sae letters.

Array programs
1. Program to print array at odd position.
2. Program to print to copy an array.
3. Program to print array in decending order.
4. Program to print array in ascending order.
5. Program to print frequency of an array.
6. Program to print array at even position.
7. Program to print biggest array value.
8. Program to print duplicate array.
9. Program to print even array element.
10. Program to print odd array element.
11. Program to print array
12. Program to print reverse array.
13. Program to print second largest array element.
14. Program to print third largest array element.
15. Program to print smallest array element.
16. Program to print number of element.
17. Program to print sum of array element.

Mathematics:
1. Write a java program to find Area of Circle.

2. Write a java program to find the Area of Rectangle.

3. Write a java program to find the Area of Rhombus.

4. Write a java program to find curved surface Area of cube.

5. Write a java program to find the Area of parallelogram.

6. Write a java program to find the volume of Cylinder.

7. Write a java program to find the perimeter of a rectangle.

8. Write a java program to find the perimeter of a circle.

9. Write a java program to find the perimeter of Rhombus.

10. Write a java program to find perimeter squares.

11. Write a java program to find perimeter of Equilateral

12. Write a java program to find the Area of Isosceles Triangle.

13. Write a java program to find the Area of Equilateral triangle.

14. Write a java program to find the Area of Triangle.

15. Write a java program to find the volume of Cone.

16. Write a java program to find the volume of Prism.

17. Write a java program to find the volume of the sphere.

18. Write a java program to find Total surface area of Cylinder.

19. Write a java program to find HCF of numbers.

20. Write a java program to find Distance between Two Numbers.

21. Write a java program to find power of any number.

22. Write a java program to find String Count.

23. Write a java program to find Discount on a product.

24. Write a java program to find Depreciation.

25. Write a java program to Calculate Commission.

26. Write a java program to Calculate Batting Average.

27. Write a java program to find Area of the hexagon.

28. Write a java program to find Area of a polygon.


29. Java program to perform maths operations add, delete, multiply, divide.

30. Java program to check if given three side lengths can make a triangle or
not.

Basic Program:

1. Write a java program to Count Vowels in a String.

2. Write a java program to print an American Flag.

3. Write a java program to add two binary numbers.

4. Write a java program to multiply two binary numbers.

5. Write a Java program to concatenate two strings.


6. Write a Java program of farm management.
7. Write a Java program to check GPA.
8. Write a Java program to check NCR and NPR.
9. Write a Java program to compute electricity bills.
10. Write a Java Java program to count syllables.
11. Write a Java Java program of First and Last Concat.

12. Write a java program to check whether java is installed on your computer.

13. Write a java program to count the letters, spaces, numbers and other characters
of an input string.

14. Write a java program to create and display a unique three digit number using
1,2,3,4.Also count how many three digit numbers are there.

15. Write a java program to print the ascii value of a given character.

16. Write a java program that accepts an integer(n) and compute the value of n + nn
+ nnn.

17. Write a java program to print the odd number from 1 to 99.

18. Java program to check the number is even or not print 1 if the n is even or 0 if
the n is odd.

19. Java program to print numbers between 1 to 100 which are divisible by 3,5 and
by both.

20. Java program to compute the square root of a given number.

21. Java program to check if a given string has all unique characters.

22. Java program to convert temperature from Fahrenheit to Celsius degree.

23. Java program to read that number in inches, convert it to meter.

24. Java program that reads an integer between 0 & 1000 and adds all the digits in
the integer.
25. Java program that keeps a number from the user and generates an integer
between 1 and 7 and displays the name of the weekday.

26. Java program to find the number of days in a month.

27. Write a program addition of matrices.


28. Write a program multiplication of matrices.
29. Write a program subtraction of matrices.
30. Write a program to find the average of three numbers.
31. Write a program to find simple interest.
32. Write a program using bitwise operators.
33. How to read and print an integer value in java.
34. Java program to multiply two floating-point numbers.
35. Java program to add two complex numbers.
36. Java program to find if a given year is leap year.
37. Java program to merge two arrays.
38. Java program to check whether the character is vowel or consonant.
39. Java program to create a class and object example.
40. Java program of basic school management.
41. Java program of shop goods name and discount example.
42. Using inheritance vehicle details program in java.

43. Java program to convert decimal number to octal number.

44. Java program to convert decimal to hexadecimal number.

45. Java program to convert decimal to binary number.

46. Write a Java program to get the length of a given string.

47. Write a Java program to convert all the characters in a string to uppercase .

48. Write a Java program to find the longest Palindromic Substring within a string.

49. Write a Java program to find all interleavings of given strings.

50. Write a java program to print all permutations of a given with repetition.

51. Write a java program to print after removing duplicates from a given string.

52. Write a java program to find non repeating characters in a given string.

53. Java program to divide a string in equal part.

54. Write a Java program to find the maximum occurring character in a string.

55. Java program to reverse a string using recursion.

56. Java program to reverse every word using a method.

57. Java program to convert string upper case to lower case.

58. Java program to convert string lower case to upper case.

59. Java program to print tables.


60. Java program to print Diamond star pattern.

61. Java program to print Hollow Rhombus star pattern.

62. Java program to print hollow right angle triangles.

63. Java program to print inverted pyramid patterns.

64. Java program to print plus star pattern.

65. Java program to print rhombus.

66. Java program to print star.

67. Java program to print the right arrow pattern.

68. Java program to print star.

69. Java program to print 8 star patterns.

70. Java program to print X star pattern.

71. Java program to find middle char String.

72. Java program to count vowels in the string.

73. Java program to find twin prime numbers.

Collection:.
1. Java program to create Array List.

2. Java program to Iterate Array List.

3. Java program to insert an element in an array list at index 0.

4. Java program to remove an element in an array list.

5. Java program to search an element in an array list.

6. Java program to sort an array list.

7. Java program to copy one array list into another list.

8. Java program to shuffle elements in array list.

9. Java program to reverse an array list.

10. Java program to extract from array list.

11. Java program to compare two array lists.

12. Java program to swap an element in an array list.

13. Java program to empty an array List.

14. Java program to check array list empty or not.


15. Java program to increase capacity of an array list.

16. Java program to replace elements in an array list.

17. Java program to print all the elements in an array list using the position of the array.

18. Java program to show linked list examples.

19. Java program to iterate linked lists.

20. Java program to iterate linked lists with specific positions.

21. Java program to use reverse iterator linked list.

22. Java program to insert the specified element at the specified position in the linked list.

23. Java program to insert in linked list at first and last position.

24. Java program to insert in front of the linked list.

25. Java program to insert in the last position of the linked list.

26. Java program to get the first and last occurrence of the specific element.

27. Java program to display the element and their positions.

28. Java program to remove elements in linked lists.

29. Java program to remove the first and last element in the linked list.

30. Java program to remove all elements in the linked list.

31. Java program to swap elements in a linked list.

32. Java program to shuffle linked lists.

33. Java program to join two linked lists.

34. Java program to check if elements are present in the linked list or not.

35. Java program to remove elements and return the first element of the linked list.

36. Java program to convert linked list into array list.

37. Java program to replace elements in linked lists.

38. Java program to show a hash set example.

39. Java program to Iterate hash set elements.

40. Java program to find size of hash set.

41. Java program to hash set empty or not.

42. Java program to convert a hash set into an array.

43. Java program to convert a hash set into a tree set.

44. Java program to convert a hash set into an array list.


45. Java program to compare two hash sets.

46. Java program to show examples of vectors.

47. Java program to show tree set examples.

48. Java program to iterate tree set elements.

49. Java program to add one tree set to another tree set.

50. Java program to reverse tree set through iterator.

51. Java program to get the first and last element in the tree set.

52. Java program to get the size of a tree set.

53. Java program to get the element from a tree set which is greater than or equal to another
element.

54. Java program to get the element from a tree set which is less than or equal to another
element.

55. Java program to remove the first element from the tree set.

56. Java program to remove a given element from a tree set.

57. Java program to show a hash map demo.

58. Java program finds the size of a hash map.

59. Java program to check hashmap empty or not.

60. Java program to check if a map contains a key or not.

61. Java program to check if a map contains a value or not.

62. Java program to show a demo of a tree map.

63. Java program to copy one tree nap to another tree map.

64. Java program to check if a key in a treemap exists or not.

65. Java program to check if the value in treemap exists or not.

66. Java program to get all keys in treemap.

67. Java program to delete all elements in treemap.

68. Java program to sort elements in tree maps.

69. Java program to show in tree map first and last entry.

70. Java program to get the first or lowest and last or highest element in a tree map.

I/O:
1. Java program to copy commands.
2. Java program to copy images.

3. Java program to find directory.

4. Java program to check directory or file.

5. Java program to file directory files.

6. Java program to file input stream example.

7. Java program to file output stream example.

8. Java program to check file size.

9. Java program to check input.

10. Java program to check modification time.

11. Java program to check output.

Array:
1. 1. Java program to sort arrays.
2. 2. Java program to find sum of arrays.
3. 3. Java program to find the average of arrays.
4. 4. Java program to test if an array contains value or not.
5. 5. Java program to find an index of an array.
6. 6. Java program to find specific elements of an array.
7. 7. Java program to copy arrays by iterating.
8. 8. Java program to insert an element in an array.
9. 9. Java program to reverse an array.
10. 10. Java program to find duplicate values in an array of integer values.
11. 11. Java program to find duplicate values in an array of string values.
12. 12. Java program to find common element strings between two arrays.
13. 13. Java program to find common element integers between two arrays.
14. 14. Java program to find the second largest element in an array.
15. 15. Java program to find the second smallest element in an array.
16. 16. Java program to find sum of two matrices.
17. 17. Java program to convert array to array list.
18. 18. Java program to convert array list to array.
19. 19. Java program to find all pairs of elements in an array whose sum is equal to a specific
number.
20. 20. Java program compares two arrays equality.
21. 21. Java program to find missing numbers in an array.
22. 22. Java program to find the number of even or odd numbers in an array.
23. 23. Java program to find differences between highest and lowest numbers.
24. 24. Java program to find the average of numbers accepting the highest and lowest number in
an array.
25. 25. Java program to check if an array without 0 and -1.
26. 26. Java program to check if an array contains two specific numbers or not.
27. 27. Java program to remove duplicate elements in an array.
28. 28. Java program to cyclic rotate array clockwise by one.
29. 29. Java program to find the index of two elements whose sum is integer in an array.
30. 30. Java program to find leaders of an array.
31. 31. Java program to find the sum of two elements is the minimum in the array.
32. 32. Java program to check the maximum product of two elements in an array.
33. 33. Java program to find all unique triplets such that sum of all the three elements equal to a
specific.
34. 34. Java program to find a sum of four elements which is equal to a specific target element.
35. 35. Java program to print the contents of two Dimensional Boolean arrays where t will
present for true and f will present for false.
36. 36. Java program to print an array after changing row and column in array.
37. 37. Java program to find the smallest element in an array.
38. 38. Java program to find the kth largest element in a given array.
39. 39. Java program to find the numbers greater than the average of the number in a given
array.
40. 40. Java program to prove that Euclid's algorithm computes that greatest common divisor of
two positive numbers.
41. 41. Java program to create two D arrays that A[i][j] is true if I j are prime or have common
factors.
42. 42. Java program to divide two given integers using a subtraction operator.
43. 43. Java program to move every positive number to the right and every negative number to
the left in an array.
44. 44. Java program to move each zero to the right side in the array.
45. 45. Java program to multiply two given Integer without using *operator.
46. 46. Java program to length of the longest consecutive sequence of a given array.
47. 47. Java program to partition a given array of integer even or odd numbers.
48. 48. Java program to find the index of the first non repeating character in an array.
49. 49. Java program to find the missing string from two given strings.
50. 50. Java program to find the index of a prime number .
51.

You might also like