Is-A Relationship It denotes “One object is type of another”, It denotes inheritance methodologies. Has-A Relationship is being used with Association to apply reusability process. Objects are created by new key word.įor Example: Object o=new Object ConstructorsĬonstructor is a method or block that’s called whenever object has been created, constructor does not have return type. Object is a real word entity it contains and executed after class is created. It is a template to make structure of entire program. Class and ObjectĬlass is the most important part of oops programing. You can not write as follows int a a=5 because first one is okay but next statement i:e only assignment cannot be a member of a class,yea you can write int a=5 directly within a single statement. Members of Class mean class members which you can put inside the class. In java there are 3 types of loops while, do and for. Looping statements are executing one or more statements several numbers of time. It is a structure, which have one or two conditions to be evaluated or tested by program, with statements that are to be executed if the condition is determined to be true or false. Methods can be public, private or protected.įor Example: Public void add() Basic ProgrammingĪ High Level Programming which follows the rule BASIC. Methods are a term which is a collection of instructions. Int – DataType, i-Variable, 10 -value Methods Variables: Variables is the term which is having fixed values or pattern and it is liable to change.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |