Skip to main content

Java page with popular questions




Popular questions:

(Find your questions and click to view) 

8.Explain type casting with an example. 
9.Describe with example the way of designing and importing a package in a class.  
10.Explain any five String class functions with an example. 
11.What is an exception? How do we define a try and a catch block? 
12.List and explain some of the most common types of exception that might occur in java. 
13.Write a program in java that reads a statement from user convert it into uppercase and print the output. 
14.Create a package Math with methods Sum (int a, int b) to print sum of two numbers, and Div (int a, int b) to print division of two numbers. Write a program to implement package Math. 
15.What is a thread? Describe the complete life cycle of a thread. 
16.Explain any five String Buffer class functions with an example. 
17.Explain interface with an example. 
18.Discuss the various levels of access protection available for packages. 
19.What is a stream class? Write classification of stream classes. 
20.Write a java program to read a string and count number of vowels from the string. 
21.Write a note on Random Access File in java. 
22.Explain the following file methods with an example:
A. canWrite ()
B. length ()
C. mkdir ()
D. getName ()
E. isDirectory ()
F. setReadOnly ()
G. canRead ()
H. delete ()
I. exists () 
23.Write a program to count number of characters, words and lines in a file. 
24.Write a program to create a random access file that could store details of five employees. 
Details include employee number, name, department and salary.
25.Write a note on Reader and Writer Classes. 
26.What is a queue? Explain types of queue. 
27.Write a program to duplicate content of an array. 
28.Explain properties of an array. 
29.Write an algorithm for sequential search in an array. 
30.Write a program in java to perform push and pop operation of stack. 
31.Write a program to implement linear queue. 
32.Define stack. Explain push and pop operation of stack. 
33.Write an algorithm to search an element in linked list. 
34.Write an algorithm to insert a new node into linked list. 
35.Write an algorithm for creation of binary search tree. 
36.What is traversing? Explain various tree traversing methods. 
37.Write an algorithm for bubble sort(Selection sort). 
38.Write an algorithm for insertion sort. 
39.Write a short note on heap. 
40.Write a program in java to implement warshall algorithm. 
41.Define graph, Explain completed graph with an example. 
42.Write an algorithm for graph traversal using DFS method. 
43.Write an algorithm for graph traversal using BFS method. 
44.Explain the following types of graph:
a. Connected graph
b. Directed and undirected graph
c. Simple graph and multi-graph
d. Weighted and un-weighted graph.
e. Complete graph

Comments

  1. Glad to know, it was useful
    I'll post Advance java concepts soon...

    ReplyDelete

Post a Comment

Popular posts from this blog

Explain the tools used to monitor system security.

12.Explain the tools used to monitor system security. Ans. 1. People who, for purpose of larceny or to amuse themselves, like to break into computers, they are called ‘crackers’. 2. If there is a vulnerability in a system they will find it and use it against you. 3. Preventing use of your machine for nefarious purpose and guarding against intrusion are, in the end, your responsibility alone. 4. Red hat equips you with tools to detect and deal with unauthorised access of many kinds. 5. You need to configure those tools and understand how to sense the warning they provide. 6. Fortunately Linux is development community is quick to find potential exploits and to create ways of slamming the doors before crackers can enter in your system. 7. Red hat is careful enough to making available new, patched version in which potential exploits have been found. 8. You should make sure to download and install the repaired package. 9. This line of defence...

Explain the file systems supported by Linux.

21.Explain the file systems supported by Linux. Ans. 1. Linux can read/write to several file system that originated with other operating system much different from Linux. 2. One reason that Linux supports so many file systems is the design of its virtual file system (VFS) layer, its provides a fairly universal forms of file support, file systems supported by Linux are as follows: 3. ext3: • Ext3 stands for third extended file system. • Starting from Linux Kernel 2.4.15 ext3 was available. • The main benefit of ext3 is that it allows journaling. • Journaling has a dedicated area in the file system, where all the changes are tracked. • When the system crashes, the possibility of file system corruption is less because of journaling. (If no journaling, then fsck command (file system consistency check) is used to check for the corrupted file and to repair that file). • ext3 keeps a record of uncommitted file transactions and applies only those transactions when the sy...

Explain the boot process in Linux.

13.Explain the boot process in Linux. Ans. 1. When we turn on our PC, it runs a program called “Basic input/output System” (BIOS). 2. BIOS is the only way to communicate with the system components until the operating system is up and running and able to take over the system management functions. 3. BIOS is installed on Read only memory (ROM) chip physically attached to system board. 4. The ROM type of chip is usually referred as to as an EEPROM chip, meaning it’s not writeable by user. 5. After the BIOS loads, it performs some diagnostics on the hardware, checks the installed components to be sure they are functioning and checks the system RAM (Random access memory). 6. Next the BIOS tries to find system drives from which it can load the boot program to begin the process of starting the operating system/kernel. 7. We can specify the search order for drives by changing the setting in the system BIOS configuration. 8. Usually the first hard drive...