Question: encapsulation

Ads

 
 
 

Share on Google+Share on Google+

ramesh kondeti
encapsulation
1 Answer(s)      6 years and 3 months ago
Posted in : Java Beginners

how encapsulation is achieved? if i write private variables in my source code, it will achieve encapsulation. this statement is true in all cases....

Ads
View Answers

February 17, 2011 at 3:33 PM


Encapsulation is achieved by declaring variables as Private in a class- this gives access to data to only member functions of the class. A next level of accessibility is provided by the Protected keyword which gives the derived classes the access to the member variables of the base class- a variable declared as Protected can at most be accessed by the derived classes of the class.


Ads









Related Tutorials/Questions & Answers:
encapsulation
encapsulation   how encapsulation is achieved? if i write private variables in my source code, it will achieve encapsulation. this statement is true in all cases
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction
Advertisements
Encapsulation in Java
Encapsulation in Java Encapsulation is one of the important feature of object... in to a single unit is called Encapsulation. It means hiding the data and function from the  outside world. Encapsulation can be achieved by making the member
Encapsulation & Abstraction - Java Interview Questions
Encapsulation & Abstraction  What is the difference between Encapsulation and Abstraction
Encapsulation & Abstraction - Java Interview Questions
Encapsulation & Abstraction  What is the difference between Encapsulation and Abstraction
Encapsulation versus Absraction
Encapsulation versus Absraction  I believe no one in this world knows real difference between Encapsulation and Abstraction , one of them is me as well but if there is anyone who really understand the difference please help me
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
Reg:Encapsulation - Java Interview Questions
Reg:Encapsulation  where we use encapsulation in programs? how we know that is encapsulated?  Hi Friend, Encapsulation is a process... have to use the encapsulation feature.It hide the details by making the fields
Encapsulation in Java 7
Encapsulation in Java 7 This tutorial describe concept of  Encapsulation. It is one of OOPs concept. Encapsulation : Encapsulation is a way of wrapping up data and methods into a single unit. Encapsulation puts the data safe from
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
Encapsulation VS Abstraction - Java Beginners
Encapsulation VS Abstraction  Real Time sample code for Encapsulation... private.  Hi Friend, Encapsulation-Encapsulation is a process... to think about encapsulation is as a protective wrapper that prevents code and data
Encapsulation in Java
Encapsulation along with Inheritance, Polymorphism, and Abstraction are the four concepts of Object Oriented Programming (OOPs). Encapsulation in Java... and provides access to them by public methods. Encapsulation is a type of data
Encapsulation in Java Programming
Encapsulation in Java - One of the 4 OOPs concept In this video tutorial I will explain you the Encapsulation concept of the Java Programming language. Encapsulation is one of the 4 OOPs concepts and other three concepts
Java Encapsulation Example
Java Encapsulation Example In this section we will read about how to achieve the Encapsulation, feature of OOPs, in Java. Encapsulation is one of the concept of OOPs. Encapsulation is mechanism for hiding informations. This mechanism
Difference between Encapsulation and Abstraction in Java
In this section we will discuss about the difference between Encapsulation and Abstraction in Java. Encapsulation is a process of hiding all the data.... Encapsulation in Java is represented using  private, package-private
Encapsulation
Encapsulation       OOPs revolve around the four concepts: 1. Encapsulation 2. Polymorphism 3.... Here we will discuss Encapsulation briefly: -- Encapsulation is an important
Factory Pattern
is good since it encourages Encapsulation and Delegation. A class may need
Addition of two Number in Class
in which uses of class consists of a collection of type of encapsulation instance
java
java  Im asking for simple java program with encapsulation pls
oops concepts
oops concepts  What is polymorphism?Explain with an example. What is abstraction?Explain with an example. What is inheritance?Explain with an example. What is encapsulation?Explain with an example
java - Java Beginners
java   Can you provide me the example program which uses all the concepts like encapsulation ,inheritance ,polymorphism in a single program
pls help me with this question
pls help me with this question  how to write a program in C++ using encapsulation,polymorphism,inheritance and abstraction?(all these concepts should come in a single program
Core Java - Java Beginners
Core Java  Can u give real life and real time examples of abstraction, Encapsulation,Polymarphism....?  I guess you are new to java and new to roseindia as well.. anyways given is the encapsulation example http
corejava - Java Beginners
of Encapsulation in java? I'm a core Java beginner.  Hi,Here is the description of Encapsulation in java:Encapsulation is a process of binding... encapsulation is as a protective wrapper that prevents code and data from being
Is Java object oriented?
Is Java object oriented?  Hi, Is Java object oriented? Thanks   Hi, Java is object oriented programming language. It is supports OPPS concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation All
java bits 7 - Java Interview Questions
encapsulation. D. The cardlD and limit variables break polymorphism. E. The setCardlnformation method breaks encapsulation
Oops Definition - Java Beginners
Oops Definition  What is Abstraction and Encapsulation? What is the Difference Between Abstraction and Encapsulation? Regards M.KethraBalan....). Encapsulation - This is an important programming concept that assists in separating
java - Java Beginners
java  pl. let me know few progrograms on encapsulation. thanks... int displayVolume() {return (length*width*height);} } class Encapsulation...(); System.out.println("Volume is : " + vol); } } Encapsulation
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads