Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Intro to JAVA Programming

Lecture 01
By

Sana Khalique

NUST School of Electrical Engineering and Computer Science

1
Introduction
Pre-requisite:
 Introduction to Programming + Object Oriented
Programming

Course Code: CS-110

Credits:3+1 Contact Hrs: 3+2


Three lectures/per week one hour each
2 hours lab/ week
Administrative
Instructor: Sana Khalique
sana.khalique@niit.edu.pk
Email me and get in touch if in need
Regularly check course folder on the website
www.niit.edu.pk/~55sana/courses/java.htm

Office hours:
Friday 10:30 a.m. to 1:00 p.m.
Recommended Books and Other Material
Text Book
Java How To Program, Fifth Edition
by Deitel & Deitel

Some good reference books are


Thinking in Java (2nd edition) by Bruce Eckel
Beginning Java 2 by Ivor Horton
 Other Links
http://www.java.sun.com
http://www.javaworld.com
http://www.developer.com/java/
 Lecture Slides
 Any other material on Object Oriented Programming
Course Outline
 Introduction
 Data types and Operators
 Flow control
 Arrays and Strings
 Classes and Objects
 Inheritance
 GUI and Event Handling
 Exception Handling
 I/O and File Handling
 Threads
 Reflection
 Network Programming

5 Introduction to Java
Quizzes and Assignments
 Quizzes
Quizzes will generally be unannounced
You can expect a quiz every week
Missing a quiz means zero marks
A Quiz may also be conducted at anytime during the
lecture
 Assignments
DO NOT copy assignments
Both of the copy cases will be graded zero
NO credit on LATE submission of any deliverable.
No excuse of USB/Floppy/email servers not working
Sorry! No Exceptions
Lab Work and Project
Lab Work
Involves implementation of studied techniques and
structures.
All the coding will be done in Java
Each lab will comprise of a lab exercise to be
submitted during the same lab time (2 Hrs.)
Lab assignments will also be given to be submitted
individually
Project
You will be required to do a project after your One
Hour exam
You will have full liberty to choose any application of
your choice but your project proposals should reach
my office by the 1st week after your OHT
Grading
5% Assignments
10% Quiz
10% Course Project
30% OHT’s
45% Final

8 Introduction to Java
Lets Start the Course
Evolution of Java
Earlier Programming : Fortran, BASIC, Pascal,
Cobol
The Birth of Modern Programming: C
Object Oriented Programming : C++
JAVA
C#

10 Introduction to Java
Strengths Of JAVA
Simple
Compared to C++:
no header files, macros, pointers and references, unions,
operator overloading, templates, etc.
Pure Object Oriented - Classes + Inheritance
Platform Independent - Windows, Linux, Solaris
Secure - Type-safety + access control
Distributed - RMI, Servlet, Distributed Object Programming
Multi Threaded
No Memory Constraints
(Garbage collection)
11 Introduction to Java
JDK Editions
Java Standard Edition (J2SE)
J2SE can be used to develop client-side standalone
applications or applets.
http://java.sun.com/javase/6/download.jsp
Java Enterprise Edition (J2EE)
J2EE can be used to develop server-side applications
such as Java servlets and Java ServerPages.

Java Micro Edition (J2ME).


J2ME can be used to develop applications for mobile
devices such as cell phones.

12
Java IDE Tools
NetBeans IDE http://www.netbeans.info/downloads/index.php
JCreator
Borland Jbuilder
KAWA
Eclipse

13
Java Virtual Machine (JVM)

14 Introduction to Java
Compiling and Executing a Java
Program

15 Appendix A: Introduction to Java


My First JAVA Program
public class HelloSeecs
{
// starts a class

public static void main (String[] args) {


System.out.println(“Hello SEECS”);
}
}

public = can be seen from any package


static = not “part of” an object

16 Appendix A: Introduction to Java


Processing and Running HelloSeecs
javac HelloSeecs.java
Produces HelloSeecs.class (byte code)
java HelloSeecs
Starts the JVM and runs the main method

17 Appendix A: Introduction to Java

You might also like