Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
662 views
Java Solved Question Paper 2nd
Previous year question paper solved questions with handwritten answers for BBA CA 5th sem Pune University
Uploaded by
sarthakkamble910
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java Solved Question paper 2nd For Later
Download
Save
Save Java Solved Question paper 2nd For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
662 views
Java Solved Question Paper 2nd
Previous year question paper solved questions with handwritten answers for BBA CA 5th sem Pune University
Uploaded by
sarthakkamble910
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java Solved Question paper 2nd For Later
Carousel Previous
Carousel Next
Download
Save
Save Java Solved Question paper 2nd For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
* Question Paper- 02. Q 4. Answer any Eight: a) What is a java program structure? > To wate a Sava program, we first define dasses_ Pd then put them together [pamumentation Section | <2--- Suggested | Package Statement. <----- Optional Pare | Import Statements | g----- Optronal | | aberfince Statements | <----- Optional _ 7 | class Definitions <---= Ophonal | Main method class <---- Essential —b) Deine this keyword a a _—>_The “this! is_used inside the method or_construchr-te refer tts ___own object ie. this_is always a reference -te-the object of the _carrect class’ -type- “ed Explain in detail the data types in java Q— — The data types of java areas allows: 3) Primvbive types G) byte —L) Float. (i) Short. (viJ_ double. (ii) int (iJ boolean list long Luin) chav: 2) Reference Data Types. + Referonce data -lypes are made by-the logical grouping of Ihe logical grouping © primitive data ‘lypes Ce ne * Arrays, classes, enum eke. are Lhe example of reference data ypeWhat is an Interface Q | An interface in Java_is a blueprint of ‘static constants and abstract_metheds— only: erface- A A class can implements mere dhan_one_inter ws ie | Apter face is nok a class but a set of requirements Ir the class a class: Tt hae (What is the use of Reader a +) Input stream is cimilar to. rea Istream_1s_ similar -ty vrrter classes Ieecies mere gee to read the characters fiom thefile [Mavitee which can be_used to usr the coolants “te-the le (© Whi method ig used te specify containers layout wrth syrte, | 7) Flowlayoat Manager te method is used ty spect fy containers layouk: | Syntac:- Container container > new Container || container. settayout Crew Plowlayout UJ: nd llriter class 2 der. classes and output which are designed br (9) What_is the default layout for frame and Panel 9 —> +The default layout managers for IFrame Cequivalent te Framed | and Pane) Cequivalent t» Panel) are: 7“ +f TFrame: The default layout manager for a TPrame is 4 Border Layout. — be piety + TPanel: The default layout _managet_ “fora TPanel is Flow Lays (J. Explain Modifiers and Access Contrals. used io java. +) Modifiers are keqwords tbat Modify the behaviaur_of classes, _methods and variables: + Access Modifiers: Public, prvake, protected and default i Access Controls determine the aceassibility of classes, imethods .and variables contyals :. Public. Access... Private Access, and default Acess Access Protected fice exceptions ava Uibsanes sdhich exploins (i) Ust_and explain any 2 ine butt Jions are_available ind \lariow built-in exce 3 Array SadexOut oF Bound Pracp on, Null Pointer Exceptinn. the ~—_ These_eacep’ the error. situation exception, Pilenlotfound Exception, . “ ClasstlotfoundException, ToExceptien. pions are Artthr ae 9 ek Content Pane () : zy Explain the purpose __— > The _getContentPane U_is method of the TErame. and __ classes Ets maxy- _purpese_isto “Return the contents __ of the finme_or dialog? The content pane 1s the area here _add_compenents, suchas, buttons, labels. tert fields. and cther ayraphical user interface (G05) _ rae 9 ane Q.2. Attempt any POUR:- a a) Explain in detail the features of Tava. tc _ Following are the list of features of Java: 1) Simple» Tava is. a.simple language: There. aie various Conepts Hat make. the Java asa simple language 2) Secures Tava is aimed tv be. used in networked oF eee environments Java does not allocate direct pointer AD. MENON]. 4) Portatle +” » 1s port } ey me mraoalts JA was an. important. goal of ! nies L be portable. so-\bat as new architectures Cdue to { a operating. ayslem, or both) are developed « the. Jiawa j a could be .perted tp then 4 ss . wi T°. - ae Onented: Toa is.on Aruely object-oriented langurge: cot java is an object: Java has a wide variety of classes aa _ uct 7 rt ° be cause it. pr a robust Langlais 2 ee Sava. dove v | many Safequards th ensure. rel in not allow pointer which avoids secunty oe a e). Mulkthreaded «Java wae designed me toe tl wodd requirement of Creating interactives ne , | : roultrthreaded programming, pro grars -that do many things i pregrams- Tava supports which allows you to wate Simultaneous! y- a er a 3) Ah tere-tlearal AL central issue Pir_the Tava designe | was that of code lenge ty and portability. One ofthe “resin s_cthat_ne_guraniee _ _reain problems faang programmers E_Ne- ‘exists! thab if you write a preqram-ctoday, tt call nun 4 _teommarnw. een _on the Same machine —________- _4)_ nterpreted.- Taya enables she creation of Cress platfirm 1 programe by compiling. infe.ao iotermediate Tepresentaben * Eeatted Tava bytecode. ie ie Fa) High Performance = The java bytecode was carefully designed __[go-that it would be easy +t» translate directly vot mitre machine code for vert high performance by Using a just i dime compiler 19), Distributed - Tava factlities the building of Aistubuted applica _ bya. collection of classe for use in networked application Tava is designed for -the th diskibuled environment of the . Eorernet: : v) | Dynamics Tava language \s capable of dynamically link in in new class libranes, methods and objecks Java is imberpreted, 4 Java 1s an extremely dynamic \angquages at runtime. () What. are the rales ‘for_ method Overloading and methed overriding 2. Explain it with example. I =. 4Method Overriding Method Overloading - ~a)| To method overriding. the signaliie Tn method. overloading, we have of overriding _pethed_rnust be Same_jmore Ahan one-fnclions. with the ‘las overridden method: Fn other words, Jsame Same but orth defferent / iYhe_ number of orguments their _|sets of argument Ly pes in jypes.and the onley_rust be Same different order \.n__both- overtiding_and overridden 4 ix 6 Wels be The return type of. overloaded functions may be same or different: [he return type of both overriding and_overtid den enethed must beSame _3) [Th is an example of run-time Bt ig.an_exampe of comple= Lime | polymorphism po paly mor phism: drat © 4) [You cannot make overriding ‘method Overloaded funchons.can have less_ public. than -lhe overridden metal | drferent actess modifies: (J piteane betseen interface qad_ahsleact clas. Seed Interface Abstract _class- J 3k supports _mulbple Toberrtance: {Sn this multiple inherttane ts.net Supported 3) [Only static_and Final voriables — Finel, non-final, static & non-state at used variables can be used mplementation of abstract |Tmplementation of interface 1s eee . De ae - Class members ke private ee By default members.7¢ public as can : ere a Keyword is Used to }" extends"! keyword ig used 0 r extend an ahstine close |except) an. haodliy | | Explain the concept of exception an Exception: An “exception isan ee dicrupts De parm Flow of a program's execution: It is usually cause ri __|.an_errar suchas ing to divide by zero» accessing-a- le that doesn't exist. or other unexpected _ cond tions ~~ [Enceplion Hardling = Exceptien- bandhing- references of respending to. exceptions. ip_a_controlled ae ae of allowing the programs. crash or bebave sopredictably, | Non handling Jets devel ers_wrvle code to handle errats _ exception handling Ie velop aches provides. by the programming. language Su Baal black : - = e) What are the drfferent types of streams 9 Expla Topust streams = purpesete read_data fro a Source ____ Details: These streams are _used +to_read_data From_various __}oput sources such a files, keyboarck. and network Cnne: ‘Output sbreams « purpsse te wie data too destination. = __Such_as_-files, display er_network connections. Bt 3) | Byte streams: purpese- to handle tow binary data: | Details» These Streams. operate. row byte and are_used fir i reading and twirling binary. data. _ 4), character Streams purpose to handle text deta | Details « character stream. work worth characters. rather “than bits i making them more Suitable -fr reading and writing text == sit data in_vattous._characler_ encoding. 5). Buffered Streams = purpose~ 0 | rena.n.cépiiy, fetuct | Ss purpese- Lo Improve perfor e_by te the pumber_of I/O opesators pe ee | write data_in_larger chunks which reduce the number of i Thi Jcally involves using Speci ; gracefully This typically tpv 4 Pe Cg edch onl “| Details: These streams are used +> write data te destinatisns L i ctals: Buffered Streams use an ‘inbshndl buPforsto read ‘nd S clinteractsens. wrth. “the underlying data seurce oF devhinadian @.3(a) Inte a java program tv dis play alternate character fion a Java. pe play given String: : class. Albe1nate characlers i e Public static ueid main Cshing args al? ‘ ~ Sting. input= “abe defghiyk z _ printAernate Characters Goputd: — __—_} a lt | a public _static_voi psinkAlhernate Charnes. (Shing args Je ik Cstre = Null J str_is Empty UJ f an rintla (The Input string is empty of Now); Ent Jon For Cok leo, icstr length Os. ie z System. out proto C str. char AL _ System. out: pantln (b) Write Jaya pragram te calculate area of Circle, Triangle & . Rectangle. Cuse method ovelpadine ‘ TY public. dasa. Areacalculadoe . public double calewatoy Nea. Celoubte dius t tedurn Math PI radius * yadiva’, ¥ fablic double CalcalatorAtea (double 7c heights = boolean’. Iangle t 4 Cictriomle ) t ; return, 0:5 baset heights spublie=¢ brow naw Sllegal rqunant Bmplion (Inuit. paramebersster triangle aret: caloulation:’d: 3 ublic stobte_vold maa (string args 1) i Arse CalcalatorRadtus= 5=8; tls AreaCaleulator Calcalator = net: freaCalealedoe °° doable cirtuleRadius = 8:0, leRad | double ciraletrea = calcalator: calealaborhrse Core _ wus), System-out printla( “Area of cirde: “+ circ efrea.* | double rectanglelenglh. > 4°. double rectangle! dth= 6-0: z nets are Calealator colewlate Area (rectangle a length, reclangle width), = | S jotem-oxt: priate (” Prea_of he redangle:# reckanglees doable trangleBase= 3 0; = double triangle Height = 4:0, ti double Was nica: calculator, calculator Criang!eBass a = LlangleHeight: tue); _|Systero-out printle (* prea_of the triangle vt Lriangl eftrea): ae (Write a java program display ASCEE values of the charatts from a File. 2 =? {import java: lo BufferedReader, import Java-lo- FileReader; ‘\mpert je io. LOExceplion., ublic class Asclivaluesfiun file I public stalic veld main (sting args ost | string Flepath = “\nput-tert"; a Any ( Baflered Reader bre new Buffered Reader Ciao AleRades a (Blepatbh))% e i 4 int ch;while (€chs brread OS 420 z ystem. out: print (" characles.:"+Cchor) cha” ASCTF yalae x : F catch (TOEKeptio e) f : System: out println (" pp_errorccurd while Tedding -the fle +t _e. getislessages QO): (a) Witte _java_program to display moultiplication of 4 given num \nto the list box by clicking on buttr,. E Amport java Bwing-*; ee import java. “3____ _Amport java. aust - event. Action Event; — Lm port java awk event: ActionListener; ; __-publiic_class_multiplication TableApp extends Frame ¢ “private Test Field_nu mber-Held:, a pavate —TButwn_displayBu-tton; — vate Tlist_< String> tablelist; _ public MultiplicalionTable App Qt _ sefTille ("Multi plicationtablerpp"S: a we Q Prame- EX1T-oN-CLOSE J) ; 300,400); setSize TPanel_ panel = new j pane (J; panel. setLayoul Crew Grid Layout (s1)J; number field = new: ITertfield QO; displayButtn> new Button ("Display "ds DefaultLisLModel
labdtlodel = new Default List. Nlodel <> 5 - tgdldict = new: jlist <> Cable mode), A DisplayButton:add Action Listener Chew, Reionbishener Jt e @® Override” 1c public void action Performed.CAclionEvent ¢ Jz Lablewlodel clear): String pumberTopul= number field get Text Ui t CoumberTaput-): t ay y \nt number: Joteger pass 2 “2 "+ result Lf for Cink ie tics toy 1H \nt_vesult= number * 15 - table Model-aad Element Coumbex +,"2¢ 14 catch (number frmal Exception ox) t - lable (lode! add Element (° Tovalid_input pleace entero valid nombers J a anel-add (numborfield J: - ane! add_ (display Button); panel add( new-EScrlipane (table Uist); odd Cpanel , ng args ds 3 1% public. static veld main Cshis Cun Swing vtillies Jovokelaler Mult plicalionTable Apps app» ew. moultiplicationTabl eApe (2s app out Visible Clrue Js we} x wwclassmate What. is collection Q Explain. collection -Frame work in Asbailal “The_collection_is a group of _ objects stored in_ Single unit tohich canbe operated upen_as_ a_single entity collection Framework prrvides a set of interfaces 4 dasses for handling cllech ons of _ objects: tes Tnterfaces 2 "Collections The rook interface in the csllection va herd The main methods include add O.remove (J oo + Lisk: Extends collection and epee an eee collection. of Sequence Er, Arraylist . Unkedlist is Set = Extends collection and represents a collect: on thak [ 7 doesn't ollow duplicale element Lx: Hashset,Treeset . Tmplements “+ Arraylist = Atteszable array implements of Usk. a + Linked list Tnglements List and Deque using a. doubly inkelist - + Masel: Implements set using a hash table _ + TreeseL: Tmplements sek using a red- black tree _t HashMap = Tmplements_ Map_using a_ Bach tables | oe _Agorethms = The collection framework includes al gorthms that operate _on_collechon, such_as_sorti, Key Features = © Unified Architecture. 2) Ce - __@ 5 Performance ae aS. searching. — :Swing ts a. Java Foundabion classes LY a tas : | Swing libraries for creating cam? Swing components. are light-weight and_ provide better. level and fee! {consisten Poundalion ANT 1s a Java « AWT libraries. for creating ical 4 Abi vebuil n pal AIT Components. are heavy- and_depend_.of he nadiverys #1 welght Vow $ feel $$" ldlrite a Java pro femstreng or nob | import javawtsl: Scanner; ¢ public class Armstrang Number _ public static ald main | System: out: println “Er __num= scan: nertint UW: demops pumps 2 while (temp. tro) | tems emp fa lo; H —yes= rest (rem® rem® tem): R temps temp 1:10), | ie Coume = ree else \ystam. out print ( "\n frmstrong Number "} ram > check whether given oumber ts Use Static keyword. static int num temps mee rem’ a) tring args CIS | Scanner sean > MewScanner CSsysteminds 1 the number:"'J. : f _l Siystem- out prnele (\n Net an Armstrong Number:"J;(a Dake a java_program bs copy only Non numenc data from ‘one file ts_another file. : _Amport java.io BufferedReader; mee __\mport java.io 3ufferedIerbers . Amport_java- -io: File Readers _import joven ti. ltt Tats java io FOBxception, ublic class _copyAlon Numberic Data o ablic eaedla main (Shing “aigs eel 3 Cargs length |=: gts oh a, ss ge -favacepy Numberic Date ___ = er), if | System: out puntln(“y 7
You might also like
DBMS Project Report
PDF
100% (1)
DBMS Project Report
37 pages
C Program To Draw Pixel On The Screen Input: #Include
PDF
No ratings yet
C Program To Draw Pixel On The Screen Input: #Include
10 pages
Sample Question Paper of PRogramming in 'C'
PDF
100% (1)
Sample Question Paper of PRogramming in 'C'
4 pages
java_Very Important Questions
PDF
No ratings yet
java_Very Important Questions
1 page
II-i Java Question Bank 2024-25 Students
PDF
No ratings yet
II-i Java Question Bank 2024-25 Students
5 pages
Object Oriented Programming Using C
PDF
No ratings yet
Object Oriented Programming Using C
8 pages
Question Bank (Unit Test 1) Java Co4I
PDF
No ratings yet
Question Bank (Unit Test 1) Java Co4I
2 pages
3rd Sem Java Lab Programs
PDF
No ratings yet
3rd Sem Java Lab Programs
17 pages
Object Oriented Programming (OOPs) or C++ Sample Paper of MSBTE For Third Semester Computer Engineering Diploma (80 Marks)
PDF
90% (10)
Object Oriented Programming (OOPs) or C++ Sample Paper of MSBTE For Third Semester Computer Engineering Diploma (80 Marks)
3 pages
Unit I Basic Syntactical Constructs in Java
PDF
No ratings yet
Unit I Basic Syntactical Constructs in Java
20 pages
Super 25 Java Q&A V2V
PDF
No ratings yet
Super 25 Java Q&A V2V
37 pages
Micro Project Programming in C: Department of Computer Enineering
PDF
100% (1)
Micro Project Programming in C: Department of Computer Enineering
27 pages
2019 Summer Model Answer Paper (Msbte Study Resources)
PDF
No ratings yet
2019 Summer Model Answer Paper (Msbte Study Resources)
27 pages
1.write A Java Program For Sorting A Given List of Names in Ascending Order Using Command Line Arguments
PDF
No ratings yet
1.write A Java Program For Sorting A Given List of Names in Ascending Order Using Command Line Arguments
32 pages
Java Program
PDF
100% (1)
Java Program
25 pages
Java Last Year Question Paper
PDF
100% (1)
Java Last Year Question Paper
18 pages
Project Calender Making Using C Programming: Intoduction
PDF
No ratings yet
Project Calender Making Using C Programming: Intoduction
4 pages
Java Sample Papers With Answers
PDF
100% (1)
Java Sample Papers With Answers
154 pages
Java 5marks Imp Questions
PDF
No ratings yet
Java 5marks Imp Questions
28 pages
Data Structure
PDF
No ratings yet
Data Structure
6 pages
Managing Input / Output Files in Java
PDF
100% (1)
Managing Input / Output Files in Java
63 pages
MSBTE JAVA 9113 Question Paper
PDF
No ratings yet
MSBTE JAVA 9113 Question Paper
10 pages
Computer Graphics Moving Boat in River
PDF
No ratings yet
Computer Graphics Moving Boat in River
32 pages
Unit No.1
PDF
0% (1)
Unit No.1
47 pages
1120230-VIMP DSU Board Questions V2V
PDF
No ratings yet
1120230-VIMP DSU Board Questions V2V
73 pages
Advance Java Report
PDF
No ratings yet
Advance Java Report
22 pages
A Project Report: "Paint Application
PDF
No ratings yet
A Project Report: "Paint Application
29 pages
Java - Inheritance ppt.1-1
PDF
No ratings yet
Java - Inheritance ppt.1-1
10 pages
Final Dte Project
PDF
No ratings yet
Final Dte Project
11 pages
Practical No. 2: Use Google Docs To Make Spreadsheets and Notes. Google Document For Journal
PDF
No ratings yet
Practical No. 2: Use Google Docs To Make Spreadsheets and Notes. Google Document For Journal
13 pages
(PPR) SMART BUS-PASS SYSTEM USING QR CODE
PDF
No ratings yet
(PPR) SMART BUS-PASS SYSTEM USING QR CODE
5 pages
UNIT V-Multithreaded Programming (23 Marks) Part-A 1. Define A Thread?
PDF
No ratings yet
UNIT V-Multithreaded Programming (23 Marks) Part-A 1. Define A Thread?
20 pages
Unit 3 Java Programming Question Answer
PDF
No ratings yet
Unit 3 Java Programming Question Answer
13 pages
CGR CH 1
PDF
100% (2)
CGR CH 1
22 pages
JPR Ch3 CO 4I Notes
PDF
No ratings yet
JPR Ch3 CO 4I Notes
38 pages
Java Question Paper-2
PDF
No ratings yet
Java Question Paper-2
13 pages
DSGT Solved Paper From 2017 To 2019
PDF
No ratings yet
DSGT Solved Paper From 2017 To 2019
112 pages
Java Programming
PDF
100% (2)
Java Programming
8 pages
OOP - Constructor
PDF
No ratings yet
OOP - Constructor
15 pages
Eti 6th Sem Microproject
PDF
50% (2)
Eti 6th Sem Microproject
9 pages
Python 22616 Solved Manual (Join AICTE Telegram)
PDF
No ratings yet
Python 22616 Solved Manual (Join AICTE Telegram)
76 pages
Unit - 1 Basic Syntactical Constructs in Java.: Mundhe Shankar.G. Lecturer in IT Government Polytechnic Nanded
PDF
No ratings yet
Unit - 1 Basic Syntactical Constructs in Java.: Mundhe Shankar.G. Lecturer in IT Government Polytechnic Nanded
72 pages
"Calculate Area of Any Type of Shape Using Abstract Class.": Sneha Ohol (17) Madhura Pansare
PDF
No ratings yet
"Calculate Area of Any Type of Shape Using Abstract Class.": Sneha Ohol (17) Madhura Pansare
11 pages
CPP Microproject Final PDF
PDF
No ratings yet
CPP Microproject Final PDF
11 pages
A Micro-Project Report "Simple Calculator Application Using Java Applet and Electricity Bill Calculator of A Person Using Inheritance of Java"
PDF
No ratings yet
A Micro-Project Report "Simple Calculator Application Using Java Applet and Electricity Bill Calculator of A Person Using Inheritance of Java"
11 pages
Q1
PDF
No ratings yet
Q1
14 pages
JAVA
PDF
No ratings yet
JAVA
5 pages
503_CA
PDF
No ratings yet
503_CA
41 pages
Dca7102 - Programming in Java
PDF
No ratings yet
Dca7102 - Programming in Java
14 pages
Java Programming
PDF
No ratings yet
Java Programming
118 pages
It 2 Mark
PDF
No ratings yet
It 2 Mark
20 pages
OOPS UNIT 1,2 Two Marks
PDF
No ratings yet
OOPS UNIT 1,2 Two Marks
16 pages
Java A1
PDF
No ratings yet
Java A1
15 pages
Java Notes PDF
PDF
No ratings yet
Java Notes PDF
58 pages
Packages,: Stream Based
PDF
No ratings yet
Packages,: Stream Based
44 pages
Unit 1 JAVA
PDF
No ratings yet
Unit 1 JAVA
37 pages
paper 3 java
PDF
No ratings yet
paper 3 java
5 pages
Java Programming Language Report: January 2021
PDF
No ratings yet
Java Programming Language Report: January 2021
15 pages
Features of Java
PDF
No ratings yet
Features of Java
24 pages
Assignment For BC0047
PDF
No ratings yet
Assignment For BC0047
7 pages