Download all java programs for practice and for practical and more Study Guides, Projects, Research Java Programming in PDF only on Docsity!
Submitted To:- Submitted By:-
Mrs. Parminder Kaur Nikita Aggarwal
BCA-III
ROLL No.:- 7060
KHALSA COLLEGE FOR WOMEN,
CIVIL LINES, LUDHIANA
INDEX
SR.NO. TITLE PAGE NO. REMARKS
1. Resume.html 3
2. College website.html 4-
3. Java Programs
i) Program of if statement 13
ii) Program of if else statement 14
iii) Program of else if ladder 15
iv) Program of switch case 16-
v) Program of while statement 18
vi) Program of do while statement 19
vii) Program of for loop statement 20
viii) Program of break statement 21
xviii) Program of dynamic method
- ix) Program of continue statement 22- - x) Program of method declaration 24- - xi) Program of constructor - xii) Program of method overloading - xiii) Program of static member - xiv) Program of single inheritance - xv) Program of multilevel inheritance 30- - xvi) Program of hierarchal inheritance 32- - xvii) Program of method overriding 34- - dispatch - xix) Program of add two matrices 37- - xx) Program of multiply two matrices 40- - xxi) Program of string functions 44- - xxii) Program of implement interfaces 46- - xxiii) Program of multiple inheritance 48- - xxiv) Program of packages 51- - xxv) Program of multithreading 53- - xxvi) Program of try and catch
- xxvii) Program of multiple catch boxes 57-
- xxviii) Program of applet - xxix) Program of arithmetic operations - xxx) Program of number sort 61- - xxxi) Program of check prime no. 63-
- xxxii) Program of Transpose Matrix 65-
Logo.html
logo
SINCE 1958
KHALSA COLLEGE FOR WOMEN
CIVIL LINES,LUDHIANA
Profile.html
kcw
accommodate more than 750 students. A total of 150 staff members are engaged
at all times in converting limits into possibilities. The College, situated in the
heart of this bustling city of Ludhiana is spread over a massive 14 acres of land
equipped with state-of-the-art labs and extensive playgrounds. The college
auditorium with a seating capacity of 700 students is equipped with latest audio
visual equipment & is an epitome of modernity. The College upholds its motto?
SARBAT DA BHALA by giving admission to girls of all communities and is
leaping across all frontiers and boundaries, creating milestones in every realm,
be it academic or para-academic. As the College takes rapid strides towards
integration with the global economy, the demand for qualified professionals is
expected to spiral in the coming years and as job markets are scouting for fresh
talent, we promise to gift the country a promising young generation.
Khalsa College for Women has been serving the cause of women‘s education
for more than five decades. Accredited A+ by NAAC in the 1st cycle the college
is a trusted name in quality education attracting more than four thousand
students annually. Recognized by the UGC, the college has grant-in-aid as well
as self-financed courses. It has a reputation for excellence in academics, sports
and co-curricular activities. The college is a repository of culture and heritage
reflected in the architectural splendour of its majestic building.
Infrastructure.html
Infrastructure
Infrastructural Facilities
Library
Canteen
Computer Lab
Auditorium
Smart Classes
Open Air Theatre
First Aid Room
Book Shop
Provision Store
Seminar Room
Parking
Courses.html
Courses
COURSES
145
Msc IT
100
PGDCA
100
Campus.html
campus>
COLLEGE
CAMPUS
Java Programs
1.//Program of If statement
class example { public static void main (String p[]) { into a=10, b=5; if (a>b) { System.out.println (a); } } }
OUTPUT:- 10
3.//Program of Else if ladder
class execute { public static void main (String p[]) { into a=10, b=10; if (a>b) { System.out.println(a); } else if(b>a) { System.out.println(b); } else { System.out.println("equal"); } } }
OUTPUT:-
equal
4.//Program of Switch case
class Switchcase { public static void main (String args []) { into day=4; switch (day) { case 0: System.out.println ("Sunday"); break; case 1: System.out.println ("Monday"); break; case 2: System.out.println ("Tuesday"); break; case 3: System.out.println ("Wednesday"); break; case 4: System.out.println ("Thursday"); break;
5.//Program of While statement
class loop { public static void main (String p[]) { into i=1;
while (i<5) { System.out.println (i); i++; } } }
Output:- 1 2 3 4
6.//Program of Do while statement
class Dowhile { public static void main (String args[]) { into i=1; do { System.out.println (i); i++; } while (i< 10); } }
OUTPUT:-
7.//Program of For loop statement
class For {
for (i=1; i<5; i++) { if (i==2) { System.out.println (i); break; } } } }
OUTPUT:-
9.//Program of Continue statement
class Continue { public static void main (String args[]) { for (into i = 1; i < 100; i++) { System. out. println (" "); if (i >= 8)
break; for (into j = 1; j < 100; j++) { System. out. print (" * "); if (j == i) continue LOOP1; } } System.out.println ("BREAK"); } }
OUTPUT:-
BREAK