Skip to content

ashutosh1919/CoreJava_MockTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreJava_MockTest

This Repository contains Programs for Core Java Mock Test.

Program : 1 Write a program to find the aliquot sum of a given number. Hint: The aliquot divisors of a number are all its divisors except the number itself. The aliquot sum is the sum of the aliquot divisors. For example, the aliquot divisors of 12 are 1, 2, 3, 4, and 6 and its aliquot sum is 16. Extend this program to check if given number is a perfect number or not. If a number is equals to its aliquot sum, then it is a perfect number. Print all perfect numbers between 1 to 100.

Program : 2 Write a program that finds all anagram sets from a list of words. Anagrams are those words in which there are same characters jumbled. For example -> GOD - DOG ARE ANAGRAMS. Both words have same characters but in jumbled order. Input: listen, pot, part, opt, trap, silent, top, this, hello, hits, what, shit ------- Output: { listen, silent} { part, trap } { pot, opt, top }{ this, hits, shit }

Program : 3 Write a program to print the contents of a given tag. Ex: Input: "

This is content

" -> output: This is content Note: this should satisfy even if inner tags are available. Ex: "

This is content

"

Program : 4 Write a Program to reserve tickets in an online bus reservation system using synchronization. Program must have option for single thread to book multiple seats. For each seat, the program must take a passenger name. Program should print number of seats booked at the end as report.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages