Computer Science > Core JAVA


Instructor(s): Pratap, Dr. Mahendra
Pratap, Dr. Mahendra

Title: CEO

Company: Progia


Mahendra has a distinguished background as a scientist and as an entrepreneur. Mahendra was employed with AT&T and Lucent Technologies for 20 years where he specialized in video communications, personal computer design, ATM and IP networking.

Mahendra has a PhD in Nuclear Physics and has authored over 2 dozen scientific papers.

Course Description:

Java is arguably the most important (and most popular)  computer language today! It is widely used on the Internet by Web Servers and Web Broswers,  Mobile devices, Gaming applications and so on.

This course titled "Core Java" covers the fundamentals of Java and how to write high quality, working software that solves real problems and that can be easily maintained and modified..Java provides explicit support for the fundamental concepts of Object Oriented Programming (OOP) hence the power of Java for code reuse and extensibility. Even more important, Java programs are platform independent i.e. the same Java code will run on Linux, Windows, Mac, mobile phones etc.

The course assumes that the students signing up for this course have the basic programming experience. If not, they are encouraged to first complete "Introduction to Computer Science" Course on this site.


Course Sessions:
  • 1. Introduction to Java
  • Content Author(s): Michael Novello, Stephen Gilbert

    Session Description:

    In this Session, Stephen Gilbert from Orange Coast College, introduces the Students to Java and explains why computer science students should learn it.

    Between the video (Michael Novello) and the lecture, the following Topics are covered:

    • Java language background
    • why Java is so widely used in software industry including Web servers and clients, mobile devices, gaming.
    • Why 9 million people are programming with Java: (Answer): It's easy to learn, extremely portable, and usable for a wide variety of applications.)
    • The Java Development Cycle
    • A brief overview of how Java works its magic and achieves its platform independence, Java byte code
    • The Java Virtual Machine (JVM for short)

    Handout from MIT provides a basic introduction to the comcept of programming, translating human written programs to a language that the computers can understand (compiling) and running computer programs.

  • 2.1 Installing Java Development Kit
  • Content Author(s): Barbara Hecker, Prof Chua Hock Chuan, NTU

    Session Description:

    The first step in creating your development environment is to install Java development kit and change your environment settings to add the c:/Program Files/Java/jdk/bin directory to your path.

    In the video lecture, Barbara Hecker show how to install the Java jdk on Windows.

    The handout shows step by step instructions to install jdk on Windows, MacOS and on Linux operating systems. The source for this is "Java Notes" by Prof Chua Hock Chuan, Nanyang Technological University, Singapore.


  • 2.2 Compiling and Running Your First Java Program
  • Content Author(s): Mahendra Pratap, G. Hearn, & University of the Western Cape

    Session Description:

    In this unit, G. Hearn, & University of the Western Cape present how to write, compile and run your first Java program.

    In the video, Mahendra Pratap shows how to use the command line plus a text editor (Notepad) to compile, run a simple Java program.


  • 3. Java Language Fundamentals
  • Content Author(s): Chua Hock-Chuan,

    Session Description:

    This chapter covers the Java programming basics:

    • Variables, literals, expressions and statements.
    • The concept of type and Java's eight primitive types: byte, short, int, long, float, double, char, and boolean.
    • Implicit and explicit type-casting.
    • Operators: assignment (=), arithmetic operators (+, -, *, /, %), increment/decrement (++, --) relational operators (==, !=, >, >=, <, <=), logical operators (&&, ||, !, ^) and conditional (? :).
    • Three flow control constructs: sequential, condition (if, if-else, switch-caseand nested-if) and loops (while, do-while, forand nested loops).
    • Input (via Scanner) & Output (print(), println()and printf()) operations.
    • Arrays and the enhanced for-loop.
    • Methods and passing parameters into methods.
    • The advanced bitwise logical operators (&, |, ~, ^) and bit-shift operators (<<, >>, >>>).
    • Developing algorithm for solving problems.

  • 3.1 Simple Programming Exercise
  • Content Author(s): Manoj Nicholas

    Session Description:

    A simple programming exercise to practice console I/O, use of arrays, for loop etc. A possible solution is also provided. Write, compile and run the program. Make changes as you see fit.


  • 4 Concepts of Object Oriented Programming (OOP)
  • Content Author(s): Ravi P. Reddy, Richard Baldwin

    Session Description:

    Fundamental concepts of object oriented programming explained in the context of Grady Booch's seminal Ravi P. Reddy, Indus College of Engineering.

    He starts with explaining what is wrong with Procedural languages like Fortran, C etc. and proceeds to introduce the basic principles of Object Oriented Programming languages such as C++ and Java.

    Java provides explicit support for many of the fundamental concepts of Object Orientation:

    • Abstraction
    • Encapsulation
    • Inheritance
    • Polymorphism

    Other Java terms explained include:

    • Classes:  Class Members and Class Methods, type of classes
    • Instances of Classes: Objects, Constructors
    • Interfaces: set of methods

    In the associated handout, Richard Balldwin explains the concepts behind OOP and why you should care.



  • 4.1 Classes and Objects
  • Content Author(s): University of Western Cape, Unacademy

    Session Description:

    The video lecture and the associated handout 1 both explain the same topics:

    • what is a class
    • what are members and methods of a class
    • how to define your own class
    • concept of inheritance
    • how to create objects from a class, new operator.

    Examples of creating objects and using them in a program are illustrated


    • An object-oriented program is built from objects.
    • A Class is a "blue print" or  "template" from which objects are created Using the new() operator
    • The class defines the data values (members) the object can contain and the operations (methods) that can be performed on the object.
    • Members of a class (called the superclass or the mother class) can be reused in another class (called subclass, child class or the derived class) that inherit from it. This way, classes can be built by successive inheritance.

    The handout 1 supplements the video lecture very nicely. It explains objects, classes, messages, inheritance and reexamines the HelloWorldApp in this context.

    The handout 2 explains the usage of an important and useful keyword, "this" in Java. Within an instance method or a constructor, "this" is a reference to the current object — the object whose method or constructor is being called.



  • 4.2 Static Members and Methods of a Class
  • Content Author(s): Jose Vidal, kb4dev GmbH.

    Session Description:

    Summary of what are static variables and methods in Java classes and why they are used.

    An excellent overview of the Java keyword "static" as used for members, methods and classes is provided in the associated handout from kb4dev.


  • 4.3 Abstract Class, Interfaces
  • Content Author(s): Jason Wertz, kb4dev GmbH

    Session Description:

    In the video lecture, abstract classes and interfaces are explained by Jason Wertz. Briefly:

    • An abstract class in Java cannot be instantiated. It provides a template with common characteristics for the subclasses derived from it. Abstract classes are declared with the abstract keyword.
    • In Java, multiple inheritance is achieved with a powerful construct called interface. Interfaces just specify the method declaration.One or more abstract classes can define partial implementations of the interface.Interface definition begins with the interface keyword.


    Handout 1: Abstract Class from kb4dev

    Handout 2: Interfaces from kb4dev

  • 5 Check Your Understanding of Objects and Classes
  • Content Author(s): Mahendra Pratap

    Session Description:

    Here you can check your understanding of objects and classes.

  • 6 Java packages
  • Content Author(s): Chua Hock Chuan Nanyang Technological University , Thomas A. Alspaugh formerly from University of California, Irvine

    Session Description:

    Prof. Chua Hock Chuan Nanyang Technological University. presents an overview of Java packages with examples, He shows how the Java Compiler finds files and the role of The CLASSPATH environment variable. Briefly:

    • A Java package is a mechanism for organizing Java classes into namespaces. A package is basically a directory that contains the related classes.
    • in Java, every class is part of some package. .

    In the associated handout, Thomas A. Alspaugh formerly from University of California, Irvine shows step by step instructions on how to create and use packages in Java.

  • 6.1 Java Packages and Classes Bundled with JDK
  • Content Author(s): Andy Wicks, Oracle

    Session Description:

    The JDK has a large number of packages and classes bundled with it that you can use in your programs.

    In this video, Andy Wicks from Oracle explains what the Java Application Programming Interface (API) is and how to find and import those packages that are useful to you.

  • 7. Input/Output Operations in Java
  • Content Author(s): CS 201 York College, Sunil Kumar, Zenolocity LLC

    Session Description:

    This session, from CS 201, Fundamentals of Computer Science II, at York College, provides an overview of File I/O and stream operations in Java with examples.

    Video: from Sunil Kumar, Zenolocity LLC explains the Java input and output package and I/O operations in Java.


  • 8 Graphical User Interfaces: Java Swing, AWT...
  • Content Author(s): Prof. Carl Burch, Hendrix College, Arkansas, John, Cave of Programming

    Session Description:

    This Session covers the following topics in design of Java Graphical User Interfaces:

    • Introducing Swing and AWT
    • The simplest GUI with JFrame
    • Inserting components
    • Interfaces
    • Event Handling with Event listeners
    • Composing GUIs: JPanel class, Layouts
    • Example

    Video: Writing a Basic Swing Application

    Handout::More with Swing:

    • A customized component
    • Handling mouse interaction


  • 9. Advanced Topics: Java Exceptions and Exception handling
  • Content Author(s): David Hovemeyer, York College, Frank Torres, Oracle Corp

    Session Description:

    An exception in Java is an unexpected event (i.e. an error) that may stop the execution of your program. For example, the program may try to open a file using a FileInputStream or FileReader;  if the file it is trying to open doesn't exist, a FileNotFoundException then occurs. Because the file cannot be opened, it makes no sense to continue executing the code that will read from the file.

    This session covers how Java programs can handle run time errors. The keywords are: try, catch, finally, throw, throws

  • 10. Advanced Topics: Multi Threading/Concurrent Programming in Java
  • Content Author(s): John, Cave of Programming, Prof Chua Hock-Chuan, Reza Ghafari

    Session Description:

    These Lecture Notes from Prof Chua Hock-Chuan discuss

    •     Threads, Processes and Multitasking
    •     How to Create Threads
    •     The LifeCycle of a Thread

    The Video from Cave of Programming shows two ways of creating threads in a Java program: extending a thread class; and creating a class that implements a runnable interface.

    The Handout discusses basic thread synchronization, thread safety and other issues with concurrency.


  • 11. Advanced Topics: Internet Programming with Java
  • Content Author(s): Prof Ray Toal, Loyola Marymount University, LA, Dave Goddeau,, Natarajan Meghanathan, Jackson State University

    Session Description:

    In this session, Prof Ray Toal, Loyola Marymount University, LA shows how to write network applications from scratch in Java. It uses the client-server paradigm. Briefly:

    •     One program, called the server blocks waiting for a client to connect to it
    •     A client connects
    •     The server and the client exchange information until they're done
    •     The client and the server both close their connection

    Video: Dave Goddeau from discusses network programming using Java sockets.

    Look at this Video first, if you have difficulty following the lecture notes.

    In the associated handout, Natarajan Meghanathan, Associate Professor of Computer Science, Jackson State University provides an excellent but brief tutorial on network programming using Java. It explains the concept of Interprocess communication, unicast and multi cast protocols, client server model and gives a sound background for Internet programming with Java using sockets.

    Note that the Socket API is a low-level programming facility for implementing IPC. The upper-layer facilities are built on top of the operations provided by the Socket API.

  • 12. Advanced topics: Database Handling
  • Content Author(s): Dr. Natasha Alechina, Prof. Chua Hock Chuan

    Session Description:

    This session covers database handling using Java.

    The lecture from Dr. Natasha Alechina, School of Computer Science University of Nottingham provides the foundation for connecting to and communicating with a database.

    The associated handout from Prof. Chua Hock Chuan of Nanyang Technological University, shows specific programming example to implement the same using JDBC driver and open source mysql database.

  • 13. Introduction to Android
  • Content Author(s): Mahendra Pratap

    Session Description:
    In this lecture, the following topics are covered at a high level (these are explained in more details in later Sessions):
    • What you need to know to develop Android Applications
    • What is Android.
    • Software Stack for Mobile Devices.
    • Building blocks for Android Applications

    Some slides are adopted from "The Introduction to Android by Andrew Zhang,

    A few excellent Resources for Android Development are:

    1. Training for Android Development by Google:

    2. Introduction to Android by Google:

    In these you will find all the tools and documentation that you need for developing Android applications.

    3.  An excellent set of lectures (Videos and slides) on Android Application by Marco Gargenta:


  • 14. Introduction to developing Android Applications
  • Content Author(s): Marko Gargenta

    Session Description:
    In a live recording from Marakana's Android Bootcamp Training Course, Marko Gargenta will take you through:
    - The Android software stack
    - The Dalvik VM
    - Setting up the Android SDK with the Eclipse environment.

  • 15. Android for Java Developers
  • Content Author(s): Marko Gargento

    Session Description:

    While Android is based on Java, there are some fundamental differences and Android specific constructs to consider. In this presentation,Marko Gargento will take you through the anatomy of and Android application and demonstrate key Android building blocks.

    You will learn about:
    - Activities
    - Intents
    - Services
    - Broadcast Receivers
    - Content Providers

You are not signed up for this course