List out the rules to name an identifier in Java with valid and invalid examples. પરશન.1 (અ) JAVA મા આઇડનટીફાયરન નામ આપવાના નનયમોની યાદી માનય અન અમાનય ઉદાહરણો સાથ બનાવો.
[3 marks]List out different types of operators in Java. Explain Arithmetic and Logical Operators in detail. (બ) JAVA ના ઓપરટ સસની યાદી બનાવો. Arithmetic અન Logical ઓપરટ સસન સમજાવો.
[4 marks]Write a program in Java to reverse the digits of a number for number having three digits. Like reverse of 653 is 356. (ક) 3 આકડાની સખયાન નવપરીત કરવા માટ JAVA પરોગરામ લખો. ઉદાહરણ તરીક, સખયા 653 છ તો તની નવપરીત સખયા 356 છ.
[7 marks]Write a program in Java to add two 3*3 matrices. (ક) 3*3 મનટિકસનો સરવાળો કરવા માટનો JAVA પરોગરામ લખો.
[7 marks]Write a program in Java that shows the use of parameterized Constructor. પરશન.2 (અ) પરામીટરાઇઝડ કનટટિકટર નો ઉપયોગ દરાસવતો JAVA પરોગરામ લખો.
[3 marks]Give the basic syntax of the following terms with an example: (1) To create a Class, (2) To create an Object, (3) To define a Method, (4) To declare a Variable. (બ) ઉદાહરણ સાથ નીચના રબદોની બસીક સીનટકસ આપો: (1) કલાસ બનાવવા માટ, (2) ઑબજક ટ બનાવવા માટ, (3) મથડન વયાખયાનયત કરવા માટ, (4) ચલ(વરીએબલ)ન ડીકલર કરવા માટ.
[4 marks]Write a program in Java which has a class Student having two instance variables enrollmentNo and name. Create 3 objects of Student class in main method and display student’s name. (ક) JAVA મા એક પરોગરામ લખો જમ ા Student નામનો Class છ. જમ ા enrollmentNo અન name નામ ના બ ઇનસટનનટ વરીએબલ હોય. Student Class ના 3 ઓબજક ટ main મથડમા બનાવો અન Student’s ના નામ દરાસવો. OR1
[7 marks]Write a program in Java that shows the use of Default Constructor. પરશન.2 (અ) નડફોલટ કનટટિકટર નો ઉપયોગ દરાસવતો JAVA પરોગરામ લખો.
[3 marks]Give four Difference between Procedure Oriented Programming and Object-Oriented Programming. (બ) પરોનસજર-ઓનરએનટડ પરોગરાનમગ અન ઑબજક ટ-ઓનરએનટડ પરોગરાનમગ વચચ ચાર તફાવત આપો.
[4 marks]Write a program in Java which has a class Shape having overloaded methods area (float radius) and area (float length, float width). Display the area of circle and rectangle using overloaded methods. (ક) JAVA મા એક પરોગરામ લખો જમ ા Shape નામનો Class હોય જ 2 ઓવરલોડ મથડ area (ફલોટ radius) અન area (ફલોટ length, ફલોટ width) ધરાવતો હોય. ઓવરલોડ પદધનતઓનો ઉપયોગ કરીન વતતસળ અન લબચોરસનો area (નવટતાર) દરાસવો. Q. 3 (a) Write a program in Java to demonstrate single inheritance. પરશન.3 (અ) નસગલ ઇનહરીટનસ દરાસવવા માટ JAVA પરોગરામ લખો.
[3 marks]Define abstract class in JAVA with example. (બ) JAVA મા એબટટકટ કલાસન ઉદાહરણ સાથ વયાખયાનયત કરો.
[4 marks]Write a program in Java to implement multiple inheritance using interfaces. (ક) ઇનટરફસનો ઉપયોગ કરીન મલટીપલ ઇનહરીટનસન ઇમનલલમટ કરવા માટ JAVAમા પરોગરામ લખો.
[7 marks]Q. 3 (a) Write a program in Java to demonstrate multilevel inheritance. પરશન.3 (અ) મલટીલવલ ઇનહરીટનસ દરાસવવા માટ JAVA પરોગરામ લખો.
[3 marks]Define package and write the syntax to create a package with example. (બ) પકજ વયાખયાનયત કરો અન ઉદાહરણ સાથ પકજ બનાવવા માટ સીનટકસ લખો.
[4 marks]Write a program in Java to demonstrate method overriding. (ક) મથડ ઓવરરાઇનડગ દરાસવવા માટ JAVA પરોગરામ લખો. Q. 4 (a) List and explain different types of errors in Java. પરશન.4 (અ) JAVAમા નવનવધ પરકારની એરરની યાદી બનાવો અન સમજાવો.
[3 marks]What is wrapper class? Explain use of any two wrapper class. (બ) રપ ર કલાસ ર તછ? કોઈપણ બ રપ ર કલાસનો ઉપયોગ સમજાવો.
[4 marks]Write a program in Java to develop Banking Application in which user deposits the amount Rs 25000 and then start withdrawing of Rs 20000, Rs 4000 and it throws exception "Not Sufficient Fund" when user withdraws Rs. 2000 thereafter. (ક) બનકગ એનલલકરન નવકસાવવા માટ JAVA મા એક પરોગરામ લખો જમ ા વપરારકતાસ 25000 રનપયા જમા કર અન પછી 20000, 4000 રનપયા ઉપાડવાન ત રર કર અન તયારબાદ જયાર વપરારકતાસ ર. 2000 ઉપાડ તો પરોગરામ “પતરતત ભડોળ નથી” એકસપરન(exception) આપ.
[7 marks]Q. 4 (a) Describe the complete lifecycle of a thread. પરશન.4 (અ) થરડના સપણસ જીવનચકરનત વણસન કરો.
[3 marks]List access specifiers and describe their purpose in JAVA.2 (બ) ઍકસસ ટપસીફાયરની યાદી બનાવો અન JAVA મા તમના હતતનત વણસન કરો.
[4 marks]Write a program that executes two threads. One thread displays “Thread1” every 1000 milliseconds, and the other displays “Thread2” every 2000 milliseconds. Create the threads by extending the Thread class. (ક) JAVA પરોગરામ લખો જ 2 થરડો ચલાવ છ દર થરડ એક .1000 મીલીસકનડ “થરડ –I” નપરનટ કર છ, બીજો થરડ દર 2000 મીલીસકનડ – થરડ“II” નપરનટ કર છ. થરડ Classન એકટટનડ કરીન થરડ બનાવો.
[7 marks]What is stream class? How are the stream classes classified? પરશન.5 (અ) ટટિીમ કલાસ ર ત છ? ટટિીમ કલાસ કવી રીત વગીકત કરવામા આવ છ?
[3 marks]Illustrate purpose of method overriding with example. (બ) ઉદાહરણ સાથ મથડ ઓવરરાઇનડગનો હતત સમજાવો.
[4 marks]Write a program in Java to perform read and write operations on a Text file named Abc.txt. (ક) Abc.txt નામની ટકટટ ફાઇલ પર વાચવા અન લખવાની કામગીરી કરવા માટ નો JAVA પરોગરામ લખો.
[7 marks]Explain InputStream. પરશન.5 (અ) ઇનપતટ ટટિીમ સમજાવો.
[3 marks]Define package in JAVA. Write how package can be implemented in Java with proper syntax and one example. (બ) JAVA મા પકજ વયાખયાનયત કરો. યોગય સીનટકસ અન એક ઉદાહરણ સાથ JAVA મા પકજ કવી રીત ઇમલલીમનટ કરી રકાય ત લખો.
[4 marks]Write a program in Java to demonstrate use of List. 1) Create ArrayList and add weekdays (in string form), 2) Create LinkedList and add months (in string form). Display both List. (ક) List નો ઉપયોગ દરાસવવા માટ JAVA મા પરોગરામ લખો .1) ArrayList બનાવો અન અઠવાનડયાના નદવસો ઉમરો (ટટિીગ ટવરપમા) 2) LinkedList બનાવો અન મનહના ઉમરો )ટટિીગ ટવરપમા (બન List નડટલલ કરો.3
[7 marks]