Posts

Showing posts from June, 2017

Static and Dynamic Memory Allocation in JAVA

In JAVA the class contains two types of things within it which are                                                                1. Data Members                        2. Member Functions or Methods Since Data Members represent the properties of the objects and the Methods or functions within a class represent the behavior of the object of class type.     object is the entity which can have the Data Members and Methods of the class . lets consider we have a class which is as follow:                         class  Student{                                 String name;          ...

Objects and Classes In JAVA

Image
Object:-                 In real world scenario there exist different type of objects, basically objects are the thing which have some properties and some behaviors.        like a smartphone, a smartphone is the object which have different properties and behaviors , a smartphone have properties like its color, manufacturer, RAM size, ROM, processor etc. and the behavior of smartphones are calling, net surfing, calculation, data storage etc.         we can take an another example of an object. We take a scenario of an Employee. An employee is the object which has some properties like his name, age , company name, salary ,department etc . it can have behaviors too like production, how employee work, work over projects , growth of employee in the company, employee's work rate etc.             Like policeman is an object , A police...

Variables and Datatypes in JAVA

Image
Variable :-           V ariables are just a name given to a particular memory location, where it can store the data. Variables are just like label which points to a memory location. This memory location is used to hold the data or store the data.    Examples:-                           int num;                        char mchar;                                    float denum;                               boolean tf_result; Here in the above examples,                       num, mchar, denum,  tf_result represents the name of the variables. and int, char, float, boolean defines the type of dat...