0% found this document useful (0 votes)
63 views1 page

Cycle 1 Only 10 Programs

Java Program Sample

Uploaded by

anoopkumar.m
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)
63 views1 page

Cycle 1 Only 10 Programs

Java Program Sample

Uploaded by

anoopkumar.m
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/ 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’.

You might also like