Introduction of Encapsulation Besides inheritance, polymorphism and abstraction, encapsulation is one of fundamental OOP concept. mechanism of wrapping up data under single unit this is process ehere code and data are wrapped together in single unit its like a capsule, which consists of several components in medicines Java Bean is fully encapsulated class Variables /...
Tag: object-oriented programming
How to create an object from Class?
To create object in OOP, there are three steps. Step 1: Declaration object type and variable Declare a variable with variable name Declare object type Step 2: Instantiation using keyword “new” The “new” keyword is used to create object Step 3: Initialization of the object “New” keyword is followed by call to a construction This...
References and Primitive Data Types
Two types of entities are identified by JAVA Primitive Objects Primitive Data Types in JAVA most basic types of data 8 primitive data types They have fixed size They are limited to range of value byte has size of 8 bits minimum value is -128 maximum value is +127 example : byte c=32; short size...
Class and Objects in Java
Class user-defined blueprint in OOP a common set of properties are represented by class To create a class, you need to use the keyword class Example:Class named “Test” is created belowpublic class Test {int x=17;} Class describes state and behavior Remember, class is blueprint form where individual objects are generated Example Object the basic unit...
What are the major features and important characteristics of JAVA Programming?
JAVA is one of the most popular programming languages. The important and major characteristics of Java that you need to know includes: Object-Oriented Everything in java is object-oriented Java is easy to extend by creating new class Platform Independent In a correctly implemented JAVA system, the same program can run in any device. Java runs...
BSc.CSIT 2nd Semester Old Questions – Object-Oriented Programming
BSc.CSIT 2nd Semester Old Questions Subject: Object-Oriented Programming BSc.CSIT Second semester OOP Questions of Year: 2066 Attempt any two questions: (2×10=20) Explain in detail the following principles of Object-Oriented Programming.i) Data encapsulation and data hiding.ii) Inheritance and Polymorphism.iii) Abstraction Why constructor and destructor are required on Object Oriented Programming? Explain with suitableexample. Define a student...



