Вы находитесь на странице: 1из 1

Cycle 1

1) Write a Java program to generate electric bill of a person under the following
rules
a) for first 100 units rs. 1/unit.
b) for next 200 units rs.2/unit .
c) for further units rs.3/unit.
2) Write a Java program to print all the prime numbers in a Fibonacci series.
3) Write a Java program to print the magic square.
4) Write a Java program to display the day of a given date.
5) Write a Java program to transfer money from one account to another using
objects.
6) Write a Java program to implement basic operations of stack using classes and
objects.
7) Create a package called Stack. Write a Java program to implement the stack
and perform the stack operations.
8) Create a package called Queue. Write a Java program to implement the queue
and perform the queue operations.
9) Write a Java program to count number of words present in the given sentence.
10) Write a program in Java to create a String object. Initialize this object with your
name. Find the length of your name using the appropriate String method. Find
whether the character ‘a’ is in your name or not; if yes find the number of times
‘a’ appears in your name. Print locations of occurrences of ‘a’.

Вам также может понравиться