Computing Power of 2 using for loop

 In For loop, three actions are performed that is initialization, condition, Increment/decrement.
This is the main feature that are not found in any other loop.

Array of String


In Array of String we use array of String data type .We can declare array with size.In above example we use "gre" variable of Array of string type and [3] is the size of an array.
[3] means we can enter only 3 strings not more than 3, If we want to change or extend the values(strings) then we must change the size of an array.We need not change the loop
because here we use length for count the length of string  and this counts the character till ends.

Program of two Dimensional Array

 

In Array the variables store a list of values.Array are of two types… Single Dimensional Array and Multi or two Dimensional Array.In single there is single row with multiple columns or multi row with single column.In Double dimensional Array values are stored in multiple rows or multiple columns.

Syntax…..

Int myarr[][];

myarr=new int[3][4];

 

program for applet life cycle in java

An applet is a window based event driven program and its wait until an event occurs.
Every Java applet inherits a set of default behaviours from the Applet class. Whe an applet is loaded, it undergoes a series of changes in its state .

States are.....

Born State--init()
Running State--start()
Idle State---stop()
Dead State---destroy()

Usage of Thread in Applet

 

 The applet is used to display coloured bubbles of different sizes(all bubbles are of different size).
The choice or selection of the colour or size is done randomly. The array colors(colors[]) is used to store the different colours.
The Math.random() is used to randomly select the colour from the colors array and to calculate the size of the bubble.

 

Basics of C++

Introduction

The C++ Language was developed at AT&T Bell Laboratories by Bjarne Stroustrup. C++ pronounced C plus plus here “++” means the C increment operator. C++ supports the object oriented technology and C does not support object oriented language means real world entities. This is because C++ is the object oriented language. C is the structured programming language but C++ is the object oriented language.

Arithmetic Operator in C

 

Introduction of C Language

Types of   Programming Language

       1.Low Level

                   a)  Machine Level Language

                   b)  Assembly Language

 

Characteristics of C language

CHARACTERISTICS OF C LANGUAGE

C is a programming language that has been developed by Dennis Ritchie in 1970's.

1)Simple and Clear----C has richest collection of data types(int,float,char), operators(symbolic representation) and inbuilt functions.

Classes and Object

Main concept of object oriented language

1) CLASSES :

           Classes are the basis for any object oriented system classes have well defined boundaries and describe a set of objects that share similar properties and perform similar functions. Classes can be reused within a system or they can be used while developing a new system.

Page 28 of 30