Skip to main content

Posts

Showing posts from 2009

JAVA : W1-M1

Introduction to JAVA Learning Objective Welcome to the Task1 in Java. In this Module let us solve some basic problems to check how Java works. Make Sure that you learn the following concepts covered in this Module: Data Types in Java Operators Conditional Statements Iterative Statements Arrays Before getting ahead make sure you install Java Orientation Videos Programs for your reference 1.//Example Code: Hello.java /** * The Hello implements an application * that displays "Hello World!" to the standard output */ public class Hello { public static void main(String[] args) { // Display "Hello World!" System.out.println("Hello World!"); } } 2. /Example Code: MaxApp.java /** * The MaxApp class implements an application * that finds maximum of given three numbers */ class MaxApp { public static void main(String[] args) { int a=3, b=5, c=2, max=0; //else-if ladder if(a...

JAVA : W1-M2

Classes Learning Objective Welcome to the Task2 in Java . In this Module let us solve some more problems in Java Classes. Make Sure that you have learnt following concepts covered in this module What is Class Object Members Methods Constructor Method Overloading Constructor Overloading Orientation Video Introduction Class: In object-oriented programming, a class is a programming language construct that is used as a blueprint to create objects. This blueprint describes the state and behavior that the created objects all share. An object created by a class is an instan...

JAVA : W1-M3

Inheritance Learning Objective Welcome to the Day2 in Java . Here we would concentrate on solving Inheritance Problems. Inheritance Member Access & Inheritance Using Super Method Overriding Dynamic Method Dispatch Inner Classes Orientation Video Introduction Inheritance: Inheritance is the capability of a class to use the properties and methods of another class while adding its own functionality. In Java, inheritance is used for two purposes: 1. Class inheritance - create a new class as an extension of another class, primarily for the purpose of code reuse. That is, the derived class inherits the public methods and public data of the base class. Java only allows a class to have one immediate base class, i.e., single class inheritance. 2. Interface inheritance - create a new class to implement the methods defined as part of an interface for the purpose of subtyping. That is a class that implements an interface “conforms to” (or is constrained b...