Core Java Amity Tut
Core Java Amity Tut
Core Java Amity Tut
Tech (CSE)
JAVA PROGRAMMING
TUTORIAL SHEET
Tutoria Sheet ! Q1: What is Object Oriented Programming? How it is different from procedural oriented programming? Q2: E plain important features of !a"a? What are different tools of !#$? Q%: How !a"a differ from & and &''? Q( Wh) ja"a is treated as platform independent language? Q* What is +)te code, !a"a -irtual .achine and !a"a /untime En"ironment? Q0 What is !a"a 1P2? E plain different built in pac3ages a"ailable in ja"a? Q4 Which are different data t)pes a"ailable in ja"a? Q5 #escribe the structure of a simple ja"a Program? What is the tas3 of main method in ja"a program? Q6 How ja"a is more secure and /obust than other languages? Q17 #escribe "arious s)stem re8uirements for internet programming? Tutoria Sheet " Q1 What is command line argument? How the) are used? Q2 #efine the scope and lifetime of a "ariable within a program? Q %What is a class ? what are the three parts of a simple class? Q( What is constructor? What are its special properties? Q* &ompare and contrast o"erloading and o"erriding methods b) gi"ing e ample? Q0 What is abstract class? Where do we use it? Q4 What is inheritance and how does it help to create a new class? What are the different t)pes of inheritance? Q5 E plain garbage collection? What is the purpose of finali9e method? Q6 What is the use static 3e)word? When we declare a member of a class as static? Q17 :i"e the difference between super and this 3e)word?
Tutoria Sheet # Q1 What is an 1rra)? Wh) the) are easier to use as compared to a bunch of related "ariables? Q2 What is purpose of interface? :i"e the similarities between class and interface? Q% :i"e the difference between abstract class and an interface? Q( What is Pac3age ? How we can create and import a pac3age? Q* #iscuss "arious le"els of access protection a"ailable for pac3ages and their implications? Q0 #iscuss fre8uentl) used pac3ages a"ailable with ja"a 1P2 ? Q4 Which pac3age in ja"a is treated as default pac3age? Q5 E plain &;1<<P1=H? How to set &;1<<P1=H? Q6 What is the difference between public ,pri"ate and protected modifiers? Q17 How not>defined and public member of a class are different from each other? Tutoria Sheet $ Q1: What is E ception? E plain the e ception handling mechanism? Q2 How tr) catch bloc3 is used to handle e ceptions? Q% #efine chec3ed and unchec3ed e ceptions? ?ame some of them? Q( What is the difference between final, finall) @ finali9e? Q* What happen if a throws e ception is not caught? Q* ;ist some common e ception that might occurs in ja"a? Q0 What is the difference between throw and throws ? Q4 How we can create our own e ception? #iscuss b) gi"ing e ampleA Q5 What is finall) bloc3? When and How is it used? :i"e e ample to e plain it? Q6 How E ception Handling mechanism can be used to for debugging a program% Q17A :i"e e ample to show multiple tr)>catch bloc3? Tutoria Sheet & Q1: What is =hread? How it is different form a thread? Q2 #escribe the life c)cle of a =hread? Q% Which are the two methods to create a =hread based program?
Q( #iscuss "arious methods within =hread class? How do we set priorities for thread? :i"e e ampleA Q* What is the difference between suspending and stopping a thread? Q0 What is s)nchroni9ation in threads? :i"e e ample to e plain it? Q4 #ifferentiate between waitBC and sleepBC? Q5 Which interface must be implemented to create a thread based program? E plain the method contained within this interface? Q6 How do we start a thread? Which two methods b) which we can stop a =hread? Q17 #e"elop a simple =hread based program to demonstrate the concept? Tutoria Sheet ' Q1: #iscuss all the constructors of <tring and <tring +uffer class? Q2 E plain the <tring=o3eni9er class? :i"e e ample to separate to3en form a <tring? Q% What is wrapper classes? What is the use of it? Q( #iscuss the "arious objects in ja"aAutil pac3ageA Q* #iscuss "arious objects in ja"aAio pac3age? Q0 E plain "arious methods of <tring and <tring+uffer class? Q4 What is a file? How data is stored and retrie"ed from a file? Q5 What is a <tream? How is the concept of stream is used in inputDoutput operations in ja"a? Q6 #istinguish between BaC 2nput<tream and /eader class BbC Outputstream and Writer class Q17 What is the difference between BaC -ector and 1rra);ist BbC Hashtable and Hash.ap
Tutoria Sheet ( Q1 What is an E"ent ? :i"e name of sources of E"entE Q2 #iscuss 1ction E"ent and 1ction ;istener ? E plain with e ample? Q% What is E"ent <ource and E"ent ;istener? E plain the mechanism how e"ent handling wor3s?
Q( ?ame "arious e"ent source and their corresponding e"ent listeners interfaces? Q* What is 1dapter &lass? Wh) do we need them? Q0 E plain the #elegation .odel for e"ent handling? Q4 Which 1W= controls generate 1ctionE"ent?:i"e e ample? Q5 What is the highest le"el e"ent class in e"ent delegation model? Q6 What is the purpose of enableE"entBC method? Q17 Which e"ent id generated when mo"e the indicator of a scrollbar? Tutoria Sheet ) Q1 What is the difference between component and container? Q2 #iscuss "arious control items a"ailable in awt pac3age in ja"a? Q% What is Frame? Write a program to demonstrate the frame? Q( How to add and handle a button on a frame? Q* #ifferentiate the following 1C 2C %C (C *C ;abel and +utton =e tbo and =e t1rea ;ist and &ombobo <lider and <crollbar &hec3+o and &hec3+o :roup
Q0 What is ;a)out .anager? #iscuss "arious la)outs a"ailable in ja"aAawt and what is the default ;a)out manager for the panel and the panel subclasses? Q4 How to change the current la)out of a container? Q5 What is the different between swing and awt? Q6 #ifferentiate 1C 1plet and !applet 2C Frame and !frame Q17 E plain lightweight and hea")weight components
Tutoria Sheet * Q1 What is an 1pplet? &reate and run a simple applet? Q2 What is local and /emote applet? Q% E plain the life c)cle of an 1pplet? Q( What is applet tag and applet"iewer tool?
Q* What is the difference between applet and application? Q0 #iscuss steps in"ol"ed in creating an running local applet? Q4 How to pass parameters to an applet using P1/1. tag? Q5 How to add different components li3e ;abel, +utton on an 1pplet? Q6 Wh) do 1pplet class needs to be declared as public? Q17 What is the difference between initBC and startBC method of 1pplet?