Vous êtes sur la page 1sur 2

Advertise Us | Ask Question | forum | login|

Basics of Java
OOPs Concepts
Advantage of OOPs
Naming Convention
Object and Class
Method Overloading
Constructor
static variable,method
and block
this keyword
Inheritance(IS-A)
Aggregation(HAS-A)
Method Overriding
Covariant Return Type
super keyword
Instance Initializer
block
final keyword
Abstract class
Interface
Runtime Polymorphism
static and Dynamic
binding
Downcasting with
instanceof operator
Package
Access Modifiers
Encapsulation
Object class
Object Cloning
Java Array
Call By Value
strictfp keyword
API Document
Command Line
Argument
String Handling
Exception Handling
Nested Classes
Multithreading
Synchronization
I/O
Serialization
Networking
AWT
Event Handling
Swing
LayoutManager
Applet
Reflection API
Collection
JDBC
Java New Features
RMI
Internationalization
next>> <<prev
<<prev next>>
Encapsulation
Encapsulation is a process of wrapping code and data together into a single unit. It is a way to achieve data
hiding.
Simple example:
1. //save as Student.java
2.
3. package mypack;
4. public class student{
5. private string name;
6.
7. public String getName(){
8. return name;
9. }
10. public void setName(String name){
11. this.name=name
12. }
13. }
1. package mypack;
2. class Test
3. public static void main(){
4. Student s=new Student();
5. s.setname("vijay");
6. System.out.println(s.getName());
7. }
8. }

Tweet Tweet 89 Like 11k 5

New: JAXB | Junit
Home Core Java Servlet JSP Struts2 Mail API Hibernate Spring Android Quiz Projects Interview Q Comment Forum
89 6
6
Google +
3
converted by Web2PDFConvert.com
Like the www.javatpoint.com on facebook / google+ / twitter / subscribe to get latest updates
Sitemap Core Java Servlet JSP Struts2 Hibernate Spring Android Interview Questions
javatpoint.com is developed to provide easy and point to point learning and training in detail. Examples might be simplified to improve reading and
basic understanding. Tutorials and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. If there is any
mistake, please mail to sonoojaiswal1987@gmail.com or sonoojaiswal@javatpoint.com. We provide assurance of 90% interview questions.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
2011-2013 Javatpoint. All Rights Reserved.
javatpoint.com
Like
11,704 people like javatpoint.com.
Facebook social plugin
converted by Web2PDFConvert.com

Vous aimerez peut-être aussi