This document provides an overview of object-oriented programming concepts in Java, including classes, objects, variables, methods, constructors, abstraction, encapsulation, inheritance, and polymorphism. It defines classes and objects, and describes how classes act as blueprints for objects. It explains the syntax for defining classes and class members like variables and methods. It also covers method overloading, different types of methods, and how constructors are used to initialize objects. The document concludes with brief explanations of abstraction, encapsulation, inheritance, and polymorphism as fundamental principles of object-oriented design.
This document provides an overview of object-oriented programming concepts and Java programming. It discusses key OOP concepts like classes, objects, encapsulation, inheritance, and polymorphism. It then covers the history and development of Java, describing how it was initially created at Sun Microsystems in the 1990s to be a platform-independent language for programming consumer electronics. The document outlines some of Java's key features like being simple, secure, portable, robust, and architecture-neutral. It also discusses Java's object-oriented nature and support for multithreading.
The document provides an overview of object-oriented programming concepts and Java programming. It discusses key OOP concepts like abstraction, encapsulation, inheritance, polymorphism and classes. It then covers the history and development of Java, describing how it was initially created at Sun Microsystems to develop software for consumer electronics but was later targeted towards internet programming. The document also lists some of Java's key characteristics like being simple, secure, portable, object-oriented, robust and multithreaded.
The document provides an overview of object-oriented programming concepts and Java programming. It discusses key OOP concepts like abstraction, encapsulation, inheritance, polymorphism and classes. It then covers the history and development of Java, describing how it was initially created at Sun Microsystems to develop software for consumer electronics but was later targeted towards internet programming. The document also lists some of Java's key characteristics like being simple, secure, portable, object-oriented, robust and multithreaded.
The document discusses access modifiers in Java and their usage with variables, functions, and classes at different levels. It explains that access modifiers like private, protected, default, and public determine whether elements are visible from within the same class, package, subclass, or any class. Private is most restrictive while public is most accessible. It also covers other concepts like static methods, inheritance, polymorphism, abstract classes, interfaces and exception handling in Java.
This document provides an overview of object-oriented programming concepts in Java, including naming conventions, data types, variables, data hiding, abstraction, encapsulation, inheritance relationships, method signatures, polymorphism, constructors, and wrapper classes. It defines each concept and provides examples. For instance, it explains that naming conventions establish readability rules for identifiers, abstraction hides unnecessary details while exposing essential features, encapsulation allows objects to contain related properties and methods, and inheritance allows objects to acquire properties of other objects.
Hlutbundin forritun er öflug leið til að búa til hugbúnað. Hins vegar er auðvelt að gleyma eiginleikum hlutbundinna mála. Í þessum fyrri hluta um þetta efni munum við rifja upp hugtök eins og encapsulation, skil og polymorphma. Við munum líka skoða nokkur prinsipp eins og Separtaion of Concern (SoC).
Í þessu fyrirlestri mun ég upplýsa leyndarmál sem aðeins góðir forritarar vita.
The document provides information on Java OOP concepts including objects, classes, inheritance, polymorphism, abstraction, and encapsulation. It defines objects as entities with state and behavior, and classes as collections of objects. Inheritance allows objects to acquire properties of parent objects. Polymorphism allows one task to be performed in different ways. Abstraction hides internal details and shows functionality, while encapsulation binds code and data together into a single unit.
The document discusses key concepts of object-oriented programming (OOP) including objects, classes, constructors, encapsulation, inheritance, and polymorphism. It provides examples to illustrate each concept. Objects contain data (states) and behaviors (methods). A class acts as a blueprint to create objects. Constructors initialize objects. Encapsulation hides implementation details and controls access via getters and setters. Inheritance allows classes to acquire properties and behaviors of other classes. Polymorphism allows the same method to process objects differently based on their data type.
Woxa Technologies have great industrial exoerts in java field they work on the live projects with students they are not teacher they are industrial trainer.
for more information 8471003400
The document discusses key concepts of object-oriented programming (OOP) in Java, including objects, classes, inheritance, polymorphism, abstraction, and encapsulation. It provides examples of classes like Student and Rectangle to demonstrate how objects are instantiated from classes and how methods can access and modify object attributes.
This document provides an introduction to the Java programming language. It discusses the history and components of Java, including the Java language, platform, and tools. It then explains some key Java concepts like object-oriented programming, classes, objects, inheritance, and interfaces. It provides examples of how to write a simple Java program and declare methods. It also compares static and instance members and discusses abstract classes and when to use interfaces versus abstract classes.
The document discusses several object-oriented programming concepts in Java including passing objects as parameters, methods returning objects, method overloading, constructor overloading, inheritance, method overriding, and subclass constructors. It provides examples to illustrate each concept. The key points are:
1. Objects can be passed as parameters to methods and a method can return an object.
2. Methods and constructors can be overloaded based on parameters to allow different implementations.
3. Inheritance allows classes to extend existing classes to reuse properties and methods.
4. Method overriding allows redefining methods in a subclass.
5. Subclass constructors use the super keyword to invoke the parent constructor.
ZeroSpace is a part of Woxa Technology where industrial trainer are ready to trained you.Take a demo class and choose your future in the programming field. We offer to learn in latest technology with live project which is demanding.
feel free to contact us-: 8471003400
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUEVinishA23
The document discusses various object-oriented programming concepts in Java:
1. Objects are instances of classes that contain both data and functions. Classes act as blueprints for creating objects.
2. Inheritance allows subclasses to inherit attributes and behaviors from parent classes. Subclasses can override methods from parent classes.
3. Polymorphism allows functions to take different forms - either by function overloading or overriding. Overloading relies on static binding at compile time, while overriding uses dynamic binding at runtime.
Object Oriented Programming Concepts document provides an overview of object oriented programming (OOP) concepts including:
1. OOP was introduced to overcome flaws in procedural programming like lack of reusability and maintainability.
2. In OOP, a problem is divided into objects and programs are written based on these objects. Communication between objects is done through functions.
3. Key OOP concepts discussed include objects, classes, polymorphism, overloading, overriding, abstraction, encapsulation, and inheritance. Objects are instances of classes and have data and functions. Inheritance allows a child class to inherit properties from a parent class.
The document discusses different types of nested classes in Java - member inner classes, anonymous inner classes, and local inner classes. It provides examples of each type of nested class and how they can access members of the outer class. Method overloading is also covered, explaining how methods can be overloaded by changing parameters and return types. The key differences between passing objects and primitives by value and reference are explained.
Object Oriented Concepts required to know about the Android Application Programming are discussed over here. Get the most of the details about each and every concept of OO paradigm so you can use them very well in Android Application Programming.
Introduction to oop and java fundamentalsAnsgarMary
This document provides an introduction to object-oriented programming concepts in Java, including classes, objects, inheritance, polymorphism, abstraction, and encapsulation. It then discusses the Java programming environment, fundamental programming structures in Java like data types, variables, operators, control flow statements, and arrays. Key characteristics of the Java language are also summarized.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2025/06/solving-tomorrows-ai-problems-today-with-cadences-newest-processor-a-presentation-from-cadence/
Amol Borkar, Product Marketing Director at Cadence, presents the “Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor” tutorial at the May 2025 Embedded Vision Summit.
Artificial Intelligence is rapidly integrating into every aspect of technology. While the neural processing unit (NPU) often receives the majority of the spotlight as the ultimate AI problem solver, it is essential to recognize that not all AI workloads can be efficiently executed on an NPU and that neural network architectures are evolving rapidly. To create efficient chips and systems with market longevity, designers must plan for diverse AI workloads that include networks yet to be invented.
In this presentation, Borkar introduces a new processor from Cadence Tensilica. This new solution is designed to complement any NPU, creating the perfect synergy between the two processing engines and establishing a robust AI subsystem able to efficiently support workloads yet to be encountered. This combination allows developers to achieve efficiency and performance on the AI workloads of today and tomorrow, paving the way for future innovations in AI-powered devices.
More Related Content
Similar to introduction to object oriented programming language java (20)
Hlutbundin forritun er öflug leið til að búa til hugbúnað. Hins vegar er auðvelt að gleyma eiginleikum hlutbundinna mála. Í þessum fyrri hluta um þetta efni munum við rifja upp hugtök eins og encapsulation, skil og polymorphma. Við munum líka skoða nokkur prinsipp eins og Separtaion of Concern (SoC).
Í þessu fyrirlestri mun ég upplýsa leyndarmál sem aðeins góðir forritarar vita.
The document provides information on Java OOP concepts including objects, classes, inheritance, polymorphism, abstraction, and encapsulation. It defines objects as entities with state and behavior, and classes as collections of objects. Inheritance allows objects to acquire properties of parent objects. Polymorphism allows one task to be performed in different ways. Abstraction hides internal details and shows functionality, while encapsulation binds code and data together into a single unit.
The document discusses key concepts of object-oriented programming (OOP) including objects, classes, constructors, encapsulation, inheritance, and polymorphism. It provides examples to illustrate each concept. Objects contain data (states) and behaviors (methods). A class acts as a blueprint to create objects. Constructors initialize objects. Encapsulation hides implementation details and controls access via getters and setters. Inheritance allows classes to acquire properties and behaviors of other classes. Polymorphism allows the same method to process objects differently based on their data type.
Woxa Technologies have great industrial exoerts in java field they work on the live projects with students they are not teacher they are industrial trainer.
for more information 8471003400
The document discusses key concepts of object-oriented programming (OOP) in Java, including objects, classes, inheritance, polymorphism, abstraction, and encapsulation. It provides examples of classes like Student and Rectangle to demonstrate how objects are instantiated from classes and how methods can access and modify object attributes.
This document provides an introduction to the Java programming language. It discusses the history and components of Java, including the Java language, platform, and tools. It then explains some key Java concepts like object-oriented programming, classes, objects, inheritance, and interfaces. It provides examples of how to write a simple Java program and declare methods. It also compares static and instance members and discusses abstract classes and when to use interfaces versus abstract classes.
The document discusses several object-oriented programming concepts in Java including passing objects as parameters, methods returning objects, method overloading, constructor overloading, inheritance, method overriding, and subclass constructors. It provides examples to illustrate each concept. The key points are:
1. Objects can be passed as parameters to methods and a method can return an object.
2. Methods and constructors can be overloaded based on parameters to allow different implementations.
3. Inheritance allows classes to extend existing classes to reuse properties and methods.
4. Method overriding allows redefining methods in a subclass.
5. Subclass constructors use the super keyword to invoke the parent constructor.
ZeroSpace is a part of Woxa Technology where industrial trainer are ready to trained you.Take a demo class and choose your future in the programming field. We offer to learn in latest technology with live project which is demanding.
feel free to contact us-: 8471003400
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUEVinishA23
The document discusses various object-oriented programming concepts in Java:
1. Objects are instances of classes that contain both data and functions. Classes act as blueprints for creating objects.
2. Inheritance allows subclasses to inherit attributes and behaviors from parent classes. Subclasses can override methods from parent classes.
3. Polymorphism allows functions to take different forms - either by function overloading or overriding. Overloading relies on static binding at compile time, while overriding uses dynamic binding at runtime.
Object Oriented Programming Concepts document provides an overview of object oriented programming (OOP) concepts including:
1. OOP was introduced to overcome flaws in procedural programming like lack of reusability and maintainability.
2. In OOP, a problem is divided into objects and programs are written based on these objects. Communication between objects is done through functions.
3. Key OOP concepts discussed include objects, classes, polymorphism, overloading, overriding, abstraction, encapsulation, and inheritance. Objects are instances of classes and have data and functions. Inheritance allows a child class to inherit properties from a parent class.
The document discusses different types of nested classes in Java - member inner classes, anonymous inner classes, and local inner classes. It provides examples of each type of nested class and how they can access members of the outer class. Method overloading is also covered, explaining how methods can be overloaded by changing parameters and return types. The key differences between passing objects and primitives by value and reference are explained.
Object Oriented Concepts required to know about the Android Application Programming are discussed over here. Get the most of the details about each and every concept of OO paradigm so you can use them very well in Android Application Programming.
Introduction to oop and java fundamentalsAnsgarMary
This document provides an introduction to object-oriented programming concepts in Java, including classes, objects, inheritance, polymorphism, abstraction, and encapsulation. It then discusses the Java programming environment, fundamental programming structures in Java like data types, variables, operators, control flow statements, and arrays. Key characteristics of the Java language are also summarized.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2025/06/solving-tomorrows-ai-problems-today-with-cadences-newest-processor-a-presentation-from-cadence/
Amol Borkar, Product Marketing Director at Cadence, presents the “Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor” tutorial at the May 2025 Embedded Vision Summit.
Artificial Intelligence is rapidly integrating into every aspect of technology. While the neural processing unit (NPU) often receives the majority of the spotlight as the ultimate AI problem solver, it is essential to recognize that not all AI workloads can be efficiently executed on an NPU and that neural network architectures are evolving rapidly. To create efficient chips and systems with market longevity, designers must plan for diverse AI workloads that include networks yet to be invented.
In this presentation, Borkar introduces a new processor from Cadence Tensilica. This new solution is designed to complement any NPU, creating the perfect synergy between the two processing engines and establishing a robust AI subsystem able to efficiently support workloads yet to be encountered. This combination allows developers to achieve efficiency and performance on the AI workloads of today and tomorrow, paving the way for future innovations in AI-powered devices.
Enabling BIM / GIS integrations with Other Systems with FMESafe Software
Jacobs has successfully utilized FME to tackle the complexities of integrating diverse data sources in a confidential $1 billion campus improvement project. The project aimed to create a comprehensive digital twin by merging Building Information Modeling (BIM) data, Construction Operations Building Information Exchange (COBie) data, and various other data sources into a unified Geographic Information System (GIS) platform. The challenge lay in the disparate nature of these data sources, which were siloed and incompatible with each other, hindering efficient data management and decision-making processes.
To address this, Jacobs leveraged FME to automate the extraction, transformation, and loading (ETL) of data between ArcGIS Indoors and IBM Maximo. This process ensured accurate transfer of maintainable asset and work order data, creating a comprehensive 2D and 3D representation of the campus for Facility Management. FME's server capabilities enabled real-time updates and synchronization between ArcGIS Indoors and Maximo, facilitating automatic updates of asset information and work orders. Additionally, Survey123 forms allowed field personnel to capture and submit data directly from their mobile devices, triggering FME workflows via webhooks for real-time data updates. This seamless integration has significantly enhanced data management, improved decision-making processes, and ensured data consistency across the project lifecycle.
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Impelsys Inc.
Web accessibility is a fundamental principle that strives to make the internet inclusive for all. According to the World Health Organization, over a billion people worldwide live with some form of disability. These individuals face significant challenges when navigating the digital landscape, making the quest for accessible web content more critical than ever.
Enter Artificial Intelligence (AI), a technological marvel with the potential to reshape the way we approach web accessibility. AI offers innovative solutions that can automate processes, enhance user experiences, and ultimately revolutionize web accessibility. In this blog post, we’ll explore how AI is making waves in the world of web accessibility.
Artificial Intelligence in the Nonprofit Boardroom.pdfOnBoard
OnBoard recently partnered with Microsoft Tech for Social Impact on the AI in the Nonprofit Boardroom Survey, an initiative designed to uncover the current and future role of artificial intelligence in nonprofit governance.
The State of Web3 Industry- Industry ReportLiveplex
Web3 is poised for mainstream integration by 2030, with decentralized applications potentially reaching billions of users through improved scalability, user-friendly wallets, and regulatory clarity. Many forecasts project trillions of dollars in tokenized assets by 2030 , integration of AI, IoT, and Web3 (e.g. autonomous agents and decentralized physical infrastructure), and the possible emergence of global interoperability standards. Key challenges going forward include ensuring security at scale, preserving decentralization principles under regulatory oversight, and demonstrating tangible consumer value to sustain adoption beyond speculative cycles.
Interested in leveling up your JavaScript skills? Join us for our Introduction to TypeScript workshop.
Learn how TypeScript can improve your code with dynamic typing, better tooling, and cleaner architecture. Whether you're a beginner or have some experience with JavaScript, this session will give you a solid foundation in TypeScript and how to integrate it into your projects.
Workshop content:
- What is TypeScript?
- What is the problem with JavaScript?
- Why TypeScript is the solution
- Coding demo
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfAlkin Tezuysal
As the demand for vector databases and Generative AI continues to rise, integrating vector storage and search capabilities into traditional databases has become increasingly important. This session introduces the *MyVector Plugin*, a project that brings native vector storage and similarity search to MySQL. Unlike PostgreSQL, which offers interfaces for adding new data types and index methods, MySQL lacks such extensibility. However, by utilizing MySQL's server component plugin and UDF, the *MyVector Plugin* successfully adds a fully functional vector search feature within the existing MySQL + InnoDB infrastructure, eliminating the need for a separate vector database. The session explains the technical aspects of integrating vector support into MySQL, the challenges posed by its architecture, and real-world use cases that showcase the advantages of combining vector search with MySQL's robust features. Attendees will leave with practical insights on how to add vector search capabilities to their MySQL systems.
Bridging the divide: A conversation on tariffs today in the book industry - T...BookNet Canada
A collaboration-focused conversation on the recently imposed US and Canadian tariffs where speakers shared insights into the current legislative landscape, ongoing advocacy efforts, and recommended next steps. This event was presented in partnership with the Book Industry Study Group.
Link to accompanying resource: https://bnctechforum.ca/sessions/bridging-the-divide-a-conversation-on-tariffs-today-in-the-book-industry/
Presented by BookNet Canada and the Book Industry Study Group on May 29, 2025 with support from the Department of Canadian Heritage.
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfällepanagenda
Webinar Recording: https://www.panagenda.com/webinars/domino-iq-was-sie-erwartet-erste-schritte-und-anwendungsfalle/
HCL Domino iQ Server – Vom Ideenportal zur implementierten Funktion. Entdecken Sie, was es ist, was es nicht ist, und erkunden Sie die Chancen und Herausforderungen, die es bietet.
Wichtige Erkenntnisse
- Was sind Large Language Models (LLMs) und wie stehen sie im Zusammenhang mit Domino iQ
- Wesentliche Voraussetzungen für die Bereitstellung des Domino iQ Servers
- Schritt-für-Schritt-Anleitung zur Einrichtung Ihres Domino iQ Servers
- Teilen und diskutieren Sie Gedanken und Ideen, um das Potenzial von Domino iQ zu maximieren
Kubernetes Security Act Now Before It’s Too LateMichael Furman
In today's cloud-native landscape, Kubernetes has become the de facto standard for orchestrating containerized applications, but its inherent complexity introduces unique security challenges. Are you one YAML away from disaster?
This presentation, "Kubernetes Security: Act Now Before It’s Too Late," is your essential guide to understanding and mitigating the critical security risks within your Kubernetes environments. This presentation dives deep into the OWASP Kubernetes Top Ten, providing actionable insights to harden your clusters.
We will cover:
The fundamental architecture of Kubernetes and why its security is paramount.
In-depth strategies for protecting your Kubernetes Control Plane, including kube-apiserver and etcd.
Crucial best practices for securing your workloads and nodes, covering topics like privileged containers, root filesystem security, and the essential role of Pod Security Admission.
Don't wait for a breach. Learn how to identify, prevent, and respond to Kubernetes security threats effectively.
It's time to act now before it's too late!
Developing Schemas with FME and Excel - Peak of Data & AI 2025Safe Software
When working with other team members who may not know the Esri GIS platform or may not be database professionals; discussing schema development or changes can be difficult. I have been using Excel to help illustrate and discuss schema design/changes during meetings and it has proven a useful tool to help illustrate how a schema will be built. With just a few extra columns, that Excel file can be sent to FME to create new feature classes/tables. This presentation will go thru the steps needed to accomplish this task and provide some lessons learned and tips/tricks that I use to speed the process.
Mastering AI Workflows with FME - Peak of Data & AI 2025Safe Software
Harness the full potential of AI with FME: From creating high-quality training data to optimizing models and utilizing results, FME supports every step of your AI workflow. Seamlessly integrate a wide range of models, including those for data enhancement, forecasting, image and object recognition, and large language models. Customize AI models to meet your exact needs with FME’s powerful tools for training, optimization, and seamless integration
➡ 🌍📱👉COPY & PASTE LINK👉👉👉 ➤ ➤➤ https://drfiles.net/
Wondershare Filmora Crack is a user-friendly video editing software designed for both beginners and experienced users.
2. Class and objects
class is a template for an object
an object is an instance of a class
Creating class:
class classname {
type instance-variable1;
Type instance-variable2; // ...
type instance-variableN;
type methodname1(parameter-list) {
// body of method
}
type methodname2(parameter-list) {
// body of method
} // ...
type methodnameN(parameter-list) {
// body of method
}
}
Creating object :
class-var = new classname ( );
Continued…
3. //creating class
class s2 {
int a=10;
void num(){
System.out.println(a);
}
public static void main(String agrs[]){
s2 object = new s2(); //creating object
object.num();
}
}
Class and objects
4. Abstration
Abstraction in Java is the process of hiding the implementation details and
only showing the essential functionality or features to the user.
Data Abstraction may also be defined as the process of identifying only the
required characteristics of an object ignoring the irrelevant details.
In Java, abstraction is achieved by interfaces and abstract classes.
Using abstract class will only help us to acheive partially abstraction.
We can achieve 100% abstraction using interfaces.
(will study later with coding example)
5. Polymorphism
one name many forms. We can achieve polymorphism by changing the no. of parameters of method or
by changing the datatype of method
Types of Java Polymorphism
Compile-Time Polymorphism (method overloading)
Runtime Polymorphism (method overriding)
6. Compile-time polymorphism (method overloading)
public class Main{
void add(){ //method overloading
int a=30,b=20;
System.out.println((a+b));
}
void add(int a , int b){//method overloading
System.out.println((a+b));
}
public static void main(String[] args) {
Main ob= new Main();
ob.add();
ob.add(10,20);
}}
7. Run-time polymorphism (method overriding)
class mca_1st_year {
void add(){
System.out.println("super class");
}
}
public class a extends mca_1st_year{ //inheritence
void add(){
//super.add(); // for calling parent class
method
System.out.println("sub class");
}
public static void main(String args[]){
a obj = new a();
obj.add();
}
}
8. Inheritance
acquiring the properties of a class is called inheritance.
The class that is inherited is called a superclass.
The class that does the inheriting is called a subclass.
For inheriting the property extends keyword is used.
class mca_1st_year {
void add(){
System.out.println("super class");
}
}
public class a extends mca_1st_year{ //inheritance
void add(){
//super.add(); // for calling parent class method
System.out.println("sub class");
}
public static void main(String args[]){
a obj = new a();
obj.add();
}
}
9. Inheritance
Types of inheritance:
Single inheritance
Multilevel inheritance
Hierarchal inheritance
Multiple inheritance (not supported in java)
Try coding example of each…
10. Encapsulation
Encapsulation is the mechanism that binds together code and the data it
manipulates, and keeps both safe from outside interference and misuse.
Encapsulation is achieved by using different access modifiers :
public
private
protected
default (no modifier)
13. How to create our own package (user
defined package) :
package is collection of classes.
package keyword is used.(eg. package “mca_1”)
For importing user defined package:
import packageName.className; //syntax
import mca_1.classname;
We will study packages in next unit….
14. Methods
a block of code that runs only when it is called.
type name(parameter-list) //syntax
{
// body of method
}
15. Calling a method :
Box b= new Box();
b.volume();
b.setDim(1.0,1.0,2.0);
∞ Method overloading – same name with different parameters
within same class (ex. compile time Polymorphism)
∞ Method overriding – same name same parameters but in different
classes (ex. Inheritence i.e. run time polymorphism)
16. Constructors
special type of methods whose name is same as the class
name and have no return type.
The constructor is automatically called when the object is created
Types of constructor :
Default constructor
Parameterised constructor
Copy constructor
18. Parameterised constructor
class a{
a(int a , int b){
System.out.println("parameterised constructor " + (a+b));
}
}
public class cons {
public static void main(String arg[]){
a obj1;
obj1 = new a(10,30);
}
}
19. Copy constructor
Import java.io.*;
class a{
String s;
int age;
a(String s , int age){
this.s= s;
this.age=age;
}
a(a ob){
this.s=ob.s;
this.age=ob.age;
System.out.println("copy constructor :"+s+" age :"+age);
}
}
public class cons {
public static void main(String arg[]){
a obj3=new a("sukanya", 26);
a obj4= new a(obj3); //copy
}
}