Skip to main content

Unit 3 Java

Features Of OOP

 


Object

Objects are the entities through which we perceive the world around us. We naturally see our environment as being composed of things which have recognizable identities and behavior. The entities are then represented as objects in the program. In OOP system, an object is the run time entity i.e. a region of storage with associated semantics. In OOP "Object" usually means an instance of a class.

 

Example of Class and Object

public class Main //Main is name of class

{

  int num = 15;

 

  public static void main(String[] args) {

    Main myObj1 = new Main();

    Main myObj2 = new Main();

// myObj1 and myObj2 are object of main class

    System.out.println(myObj1.num);

    System.out.println(myObj2.num);

  }

}


Comments

Popular posts from this blog

Unit-1 Introduction to C#.NET (Class 12)

  What is .NET Framework? The .NET Framework is a software development platform developed by Microsoft. It provides tools and libraries to build and run Windows applications, web services, and web apps. It gives tools and libraries that make it easier to write programs. It also helps the computer run those programs safely and efficiently. Microsoft started working on .NET Framework in the late 1990s . The first version, .NET Framework 1.0 , was released in 2002 .   The .NET Framework is made up of several important components: 1.       Common Language Runtime (CLR) is the core engine that runs your program. It converts your code into machine code that the computer can understand, manages memory, handles errors, and ensures that your program runs safely. 2.       The Class Library is a large collection of ready-made code that helps you perform common tasks like working with files, databases, graphics, the i...

Unit 2 Operating System

  Unit- 2  Process and Process Scheduling 2.1 Introduce Process, Program and Process Life Cycle  Process Process is something that is currently under execution. So, an active program can be called a Process. Examples: ●        Opening a web browser to search something on the internet — the browser becomes a process. ●        Launching a music player to enjoy your favorite tunes — the music player is also a process. In computing, a process is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Modern operating systems support multithreading , meaning a process can have multiple threads running concurrently .   A Process has various attributes associated with it. Some of the attributes of a Process are: ●          Process Id: Every process will be given a unique id that identifies the process...

Introduction to Software Engineering (Class 12)

 Introduction to Software Engineering Software engineering is the branch of computer science that deals with the design, development, testing, and maintenance of software applications. Software engineers apply engineering principles and knowledge of programming languages to build software solutions for end users. IEEE, in its standard 610.12-1990, defines software engineering as the application of a systematic, disciplined, which is a computable approach for the development, operation, and maintenance of software. Boehm defines software engineering, which involves, ‘the practical application of scientific knowledge to the creative design and building of computer programs. It also includes associated documentation needed for developing, operating, and maintaining them.’ Importance of Software Engineering Reduces complexity Large software systems are divided into smaller, manageable modules. Each module is developed and solved independently, ...