0% found this document useful (0 votes)
5 views4 pages

Java Basics for COMP 006 Review

Java is a popular, high-level programming language that is widely used for web development, mobile apps, and enterprise applications. A Java program consists of packages that organize classes and interfaces. Classes contain methods and fields to define objects. The basic elements of a Java program include variables to store data, methods to perform tasks, and comments for documentation. Control structures like if/else statements, switch statements, and loops are used to control program flow.

Uploaded by

sngcover21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Java Basics for COMP 006 Review

Java is a popular, high-level programming language that is widely used for web development, mobile apps, and enterprise applications. A Java program consists of packages that organize classes and interfaces. Classes contain methods and fields to define objects. The basic elements of a Java program include variables to store data, methods to perform tasks, and comments for documentation. Control structures like if/else statements, switch statements, and loops are used to control program flow.

Uploaded by

sngcover21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

‭COMP 006 Reviewer: Java Basic Program Structure‬ ‭COMP 006‬

‭IBITS Year 17 | A.Y. 2023-2024 First Semester Midterms‬

‭ hat is Java?‬
W
‭●‬ ‭Ja va ‬ ‭i s ‬ ‭a ‬ ‭h i gh-l evel ,‬ ‭o bject-ori ented‬ ‭p rogra mmi ng‬ ‭l a ngua ge‬ ‭d evel oped‬ ‭b y‬ ‭S un‬ ‭Mi cros ys tems ‬ ‭i n‬ ‭the‬
‭m i d-1990s .‬ ‭I t‬ ‭i s ‬ ‭d es i gned‬ ‭to‬ ‭b e‬ ‭p l a tform-i ndependent,‬ ‭m ea ni ng‬‭tha t‬‭Ja va ‬‭p rogra ms ‬‭ca n‬‭run‬‭o n‬‭a ny‬‭d evi ce‬
‭tha t ha s the Ja va Vi rtua l Ma chi ne (JVM) i ns ta l l ed.‬

‭ urpose Java‬
P
‭●‬ ‭Ja va i s vers a til e a nd wi del y us ed for va ri ous purpos es , i ncl udi ng:‬
‭○‬ ‭Cros s -Pl a tform Compa tibi l i ty: Ja va progra ms ca n run on di fferent pl a tforms wi thout modi fica tion.‬
‭○‬ ‭Object-Ori ented: Encoura ges modul a r a nd reus a bl e code through cl a s s es a nd objects .‬
‭○‬ ‭S ecuri ty:‬ ‭Ja va ‬ ‭p rovi des ‬ ‭a ‬ ‭s ecure‬ ‭runtime‬ ‭e nvi ronment,‬ ‭m a ki ng‬ ‭i t‬ ‭s ui ta bl e‬ ‭for‬ ‭n etworked‬ ‭a nd‬
‭d i s tri buted envi ronments .‬
‭○‬ ‭Vers a til i ty:‬ ‭Us ed‬ ‭i n‬ ‭w eb‬ ‭d evel opment‬ ‭( Ja va ‬ ‭EE),‬ ‭m obi l e‬ ‭a pp‬ ‭d evel opment‬ ‭( Androi d),‬ ‭e nterpri s e‬
‭a ppl i ca tions , a nd more.‬

‭ asic Structure of Java Program‬


B
‭●‬ ‭Pa cka ges : Orga ni za tiona l uni ts for cl a s s es a nd i nterfa ces .‬
‭●‬ ‭Cl a s s es : Bl uepri nt for objects , conta i ni ng methods a nd fiel ds .‬
‭●‬ ‭Methods : Functions tha t perform s peci fic ta s ks .‬
‭●‬ ‭Va ri a bl es : Stora ge l oca tions for da ta .‬
‭●‬ ‭Comments : Annota tions i n the code for documenta tion.‬

‭C OMP 006: Data Structures and Algorithms‬ ‭Java Basic Program Structure‬ ‭1
‭COMP 006 Reviewer: Java Basic Program Structure‬ ‭COMP 006‬

‭IBITS Year 17 | A.Y. 2023-2024 First Semester Midterms‬

‭Initialization of Variables and Array in Java‬

‭Input and Output in Java‬

‭C OMP 006: Data Structures and Algorithms‬ ‭Java Basic Program Structure‬ ‭2
‭COMP 006 Reviewer: Java Basic Program Structure‬ ‭COMP 006‬

‭IBITS Year 17 | A.Y. 2023-2024 First Semester Midterms‬

‭If - Else Statement‬

‭Switch Statement‬

‭C OMP 006: Data Structures and Algorithms‬ ‭Java Basic Program Structure‬ ‭3
‭COMP 006 Reviewer: Java Basic Program Structure‬ ‭COMP 006‬

‭IBITS Year 17 | A.Y. 2023-2024 First Semester Midterms‬

‭Loops‬

‭C OMP 006: Data Structures and Algorithms‬ ‭Java Basic Program Structure‬ ‭4

You might also like