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)
409 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)
409 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
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
Employee Payroll Management System Using Core Java Concepts
PDF
No ratings yet
Employee Payroll Management System Using Core Java Concepts
15 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
Java Projects
PDF
No ratings yet
Java Projects
1 page
Quiz Game C++ Project Class 12th
PDF
No ratings yet
Quiz Game C++ Project Class 12th
31 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
MSBTE JAVA 9113 Question Paper
PDF
No ratings yet
MSBTE JAVA 9113 Question Paper
10 pages
Java Last Year Question Paper
PDF
No ratings yet
Java Last Year Question Paper
18 pages
Object Oriented Programming Using C
PDF
No ratings yet
Object Oriented Programming Using C
8 pages
Java 5marks Imp Questions
PDF
No ratings yet
Java 5marks Imp Questions
28 pages
java_Very Important Questions
PDF
No ratings yet
java_Very Important Questions
1 page
Unit I Basic Syntactical Constructs in Java
PDF
No ratings yet
Unit I Basic Syntactical Constructs in Java
20 pages
Java Programming
PDF
100% (2)
Java Programming
8 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
Managing Input / Output Files in Java
PDF
No ratings yet
Managing Input / Output Files in Java
63 pages
Core Java BCA Sem V Slip Solution
PDF
67% (3)
Core Java BCA Sem V Slip Solution
69 pages
II-i Java Question Bank 2024-25 Students
PDF
No ratings yet
II-i Java Question Bank 2024-25 Students
5 pages
Micro Project MIC PDF
PDF
No ratings yet
Micro Project MIC PDF
18 pages
Employee Management System
PDF
100% (1)
Employee Management System
14 pages
Model Question Paper - AdvanceJava
PDF
100% (1)
Model Question Paper - AdvanceJava
3 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
AJP Micro Project
PDF
No ratings yet
AJP Micro Project
13 pages
Question Bank (Unit Test 1) Java Co4I
PDF
No ratings yet
Question Bank (Unit Test 1) Java Co4I
2 pages
Dot Net Framework Questions
PDF
No ratings yet
Dot Net Framework Questions
10 pages
Advanced Java Subject Microproject
PDF
No ratings yet
Advanced Java Subject Microproject
16 pages
Super 25 Java Q&A V2V
PDF
No ratings yet
Super 25 Java Q&A V2V
37 pages
(AJP) Chapter 4 For Student
PDF
No ratings yet
(AJP) Chapter 4 For Student
27 pages
Snake Game: Used HTML & Css Project Report With Source Code
PDF
No ratings yet
Snake Game: Used HTML & Css Project Report With Source Code
32 pages
Rock Paper Scissors
PDF
No ratings yet
Rock Paper Scissors
9 pages
Academic Calendar - 2023-24 - 220620231536
PDF
No ratings yet
Academic Calendar - 2023-24 - 220620231536
4 pages
Basics - Inbuilt Functions in Computer Graphics
PDF
25% (4)
Basics - Inbuilt Functions in Computer Graphics
5 pages
Java Programming Micro Project (Diploma)
PDF
100% (1)
Java Programming Micro Project (Diploma)
30 pages
Dsu - Micro Project
PDF
No ratings yet
Dsu - Micro Project
20 pages
Forest Management System - Final
PDF
75% (4)
Forest Management System - Final
83 pages
Web Page Designing Microproject Proposal ON Hospital Facilites
PDF
No ratings yet
Web Page Designing Microproject Proposal ON Hospital Facilites
3 pages
CGR CH 1
PDF
100% (2)
CGR CH 1
22 pages
C++ Car Rental Micro Project
PDF
0% (1)
C++ Car Rental Micro Project
13 pages
CPP Microproject Final PDF
PDF
No ratings yet
CPP Microproject Final PDF
11 pages
Ajp Final
PDF
No ratings yet
Ajp Final
10 pages
Mad Unit Wise Imp Questions With Answer by Campusify
PDF
No ratings yet
Mad Unit Wise Imp Questions With Answer by Campusify
116 pages
SCIENTIFIC Calculator Report File
PDF
No ratings yet
SCIENTIFIC Calculator Report File
69 pages
Hospital Management System
PDF
No ratings yet
Hospital Management System
24 pages
Ajp Question Bank
PDF
No ratings yet
Ajp Question Bank
6 pages
Ajp 1
PDF
No ratings yet
Ajp 1
15 pages
Part A - Micro-Project Proposal: Assembly Language Program To Print String
PDF
50% (2)
Part A - Micro-Project Proposal: Assembly Language Program To Print String
7 pages
Networking Basics: Chapter 04 Networking in Java
PDF
No ratings yet
Networking Basics: Chapter 04 Networking in Java
42 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