Tutorials for Core Java beginners 1 Answer(s) 5 years and 4 months ago
Posted in : Java Beginners
Can anyone share their example of Encapsulation in java? I'm a core Java beginner.
View Answers
February 24, 2008 at 7:15 PM
Hi,
Here is the description of Encapsulation in java:
Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.
In other words, encapsulation is the ability of an object to be a container (or capsule) for related properties (ie. data variables) and methods (ie. functions).
public class Box { // what are the properties or fields private int length; private int width; private int height;
// what are the actions or methods public void setLength(int p) {length = p;}
public void setWidth(int p) {width = p;}
public void setHeight(int p) {height = p;}
public int displayVolume() {System.out.println(length*width*height)... }
Core Java - Java Beginners
://www.roseindia.net/software-tutorials/detail/10992
visit www.roseindia.net/java...Core Java Can u give real life and real time examples of abstraction, Encapsulation,Polymarphism....? I guess you are new to java and new
CORE JAVA CORE JAVA COREJAVA PPT NEED WITH SOURCE CODE EXPLANATION CAN U ??
CoreJavaTutorials
Roseindia Java Tutorials
in developing corejava applications and hence provide you the best tutorials... Java Quickly
Learn Java In A Day
BeginnersJavaTutorialsJava...Roseindia JavaTutorials are intended to provide in-depth knowledge of Java
java tutorials java tutorials Hi,
Much appreciated response. i am looking for the links of javatutorials which describes both core and advanced java concepts... one stop material which discusses each and every concept of core and advanced
tutorials - Java Beginners
tutorials may i get tutorials for imaging or image processing in java Hi friend,
Please explain problem in details what you want with image in java.
Thanks
core java - Java Beginners CoreJava interview Help CoreJava interview questions with answers Hi friend,Read for more information.http://roseindia.net/interviewquestions
JAVA(core) - Java Beginners JAVA(core) Core Java In java 'null' is keyword which means object have nothing to store. even not allocated memory
Core Java - Java Beginners Core Java What is Java? I am looking for CoreJava Training Hi friendThe CoreJava Technologies and application programming interface... Microsystems. We generally introduce java in two ways, corejava and advance java
JSP Tutorials
JSP Tutorials Hi,
I am confident in corejava. I have learned... on roseindia.net?
Thanks
Hi,
Thanks for learning corejava from roseindia.net.
Now you can learn Java Server pages at our JSP Tutorials section
core java - Java Beginners core java what is object serialization ?
with an example
Hi Friend,
Please visit the following link:
http://www.roseindia.net/java/example/java/io/SerializingObject.shtml
Thanks
core java - Java Beginners core java hallo sir,
in java ,int range is -128 to 127. what about '0' indicate what Hi,
In java byte range is -128 to 127, not of int
core java - Java Beginners core java how many keywords are in java? give with category? .../java/language/java-keywords.shtml
http://www.roseindia.net/java/master-java/java-keywords.shtml
Thanks
core java - Java Beginners core java what is the difference b/w #include and import?? Hi Friend,
Do you want the difference b/w '#include in C' and 'import in java'?
Thanks
core java - Java Beginners core java what is thread ? i can't understand it's need? Hi Friend,
Please visit the following link:
http://www.roseindia.net/java/thread/
Hope that it will be helpful for you.
Thanks
core java - Java Beginners core java how to write a simple java program? Hi friend...");
}
}
-------------------------------------------
Read for more information.
http://www.roseindia.net/java/master-java/index.shtml
Thanks
core java - Java Beginners core java Hi Friends,
If in an application only one thread is there if i will use wait() method what will happened ????????????????any error will come ya
that wait() method will work plzzzzzzzzzzzzzzzzzzzzzz tell me
core java - Java Beginners core java Hi guys,
String class implements which interface plzzzzzzzzzzzzz can any body tell me its very very urgentttttttttttttttt
Thanks String implements the Serializable, CharSequence
core java - Java Beginners core java when write java program in editplus.then save&compile the file.
1-text file
2-class file
3-bak file
how can get this files plz tell me Hi Friend,
Please clarify your problem.
Thanks
core java - Java Beginners core java Can we provide more than 1 try catch block Hi Friend,
Yes you can.
For more information, please visit the following link:
http://www.roseindia.net/java/exceptions/nested-try.shtml
Thanks
core java - Java Beginners core java can we write a program for adding two numbers without...-in-java/
it's about calculating two numbers
Java Program Code for calculating two numbers
http://www.roseindia.net/java/java-conversion/calculating-three
Core java - Java Beginners Core java Hello sir/madam,
Can you please tell me why multiple inheritance from java is removed.. with any example..
Thank you...://www.roseindia.net/java/master-java/inheritance.shtml
Thanks Hi
core java - Java Beginners core java can we define a function in java and answer is yes, then how we define a function in java pls provide code? Hi Friend,
class Numbers{
public int add(int num1,int num2) {
return num1+num2
core java - Java Beginners core java public static void main(String[] args)
why are write only string[]..
why cann't write int,float
Hi Friend,
Because it is very easy to convert string to other data type.
Thanks
core java - Java Beginners core java how to create a login page using only corejava(not servlets,jsp,hibernate,springs,structs)and that created loginpage contains database(ms-access) the database contains data what ever u r enter and automatically date
core java - Java Beginners core java hi,
we know that String object is immutable in nature so like string object can we create our own object and that object should be immutable i mean we cant modify our own object plzzzzzzzzzzzzz tell me the answer
core java - Java Beginners core java sir why did u declare or intilize the variables in static main method()..
But non-static members are does't decalred in the static function??
we only declare the static members in static function only
core java - Java Beginners core java Hi,
if two interfaces having same method can that method will override i mean
can we override methods in interface.plzzzzzzzzzzz can any body help me plzzzzzzzzzzzzzzzzzz... Hi
core java - Java Beginners core java hi,
what is the difference between method... and Overriding:
http://www.roseindia.net/java/javascript-array/modified-java-method-overloading.shtml
http://www.roseindia.net/java/javascript-array/modified-java
core java - Java Beginners core java write a program to display equilateral traiangle using stars?
output will be as follows:
*
* *
* * *
* * * * ...://www.roseindia.net/java/
Thanks
core java - Java Beginners core java Diff b/w Throws and Throw Hi Friend,
Please visit the following link:
http://www.roseindia.net/java/exceptions/how-to-throw-exceptions.shtml
Thanks throw is used for throwing exceptions
core java - Java Beginners core java hi..
one probledm from my end
how we can perform the TaskSheduling in java ?
coming to my project: Its is NMS domain
My project is to collect Data from network and store the data in a FileSystem
and after
core java - Java Beginners core java When we will use marker interface in our application? Hi friend,
Marker Interface :
In java language programming...://www.roseindia.net/java/master-java/interface.shtml
Thanks
core java - Java Beginners core java What is the difference between interfaces and classes? Hi friend,
ABSTRACT CLASS Interface... information :
http://www.roseindia.net/help/java/a/interface-vs-abstract
core java - Java Beginners core java catch(Exception e)
{
System.out.println(e);
}
what is use of this?? Hi Friend,
The catch block is used as an exception... the following link:
http://www.roseindia.net/java/exceptions/catching-and-handling
core java - Java Beginners core java
How to reverse the words in a given sentence??jagdysbms@yahoo.co.in Hi friend,
import java.io.*;
public class...);
}
}
-------------------------------------------------------
Read for more information.
http://www.roseindia.net/java/
Thanks
core java - Java Beginners core java write a program to add two numbers using bitwise operators? Hi friend,
i am sending running code.
public class...://www.roseindia.net/java/
Thnaks.
Amardeep
core java - Java Beginners core java question1:- what is default members? Hi Friend,
If there is no access modifiers(public, private, protected etc) declared with any variable or method or class, then it means that there is a default
core java - Java Beginners core java program logic for finding entered number either positive or negative? Hi Friend,
Try the following code:
import java.util.*;
public class CheckNumber{
public static void main(String [] args
core java - Java Beginners core java is Runnable is marker interface?is there any rule that every marker interface shouldn't contain any method specification? Hi friend,
Marker Interface is a interface which does not have methods
and also
Core Java - Java Beginners Core Java How can I take input? hai....
u can take input through command line or by using buffered reader.
An wexample for by using... information :
http://www.roseindia.net/java/
Thanks
core java - Java Beginners core java 1. What are the Advantages of Java?
2. What are the Differences between c,c++ & java?
3. Where we need to Write Java Programs?
4... the following link:
http://www.roseindia.net/java/java-introduction/java
Core Java - Java Beginners Core Java How can we explain about an object to an interviewer Hi friend,
Object :
Object is the basic entity of object oriented... to :
http://www.roseindia.net/java/master-java/java-object-oriented
core java - Java Beginners core java "Helo man&sir can you share or gave me a java code hope its ok?"thank you
Design a program that records and reports the weekly sales....
corejava
jsp
servlet
Friend use CoreJAVA .thank you so much.hope you
Core Java - Java Beginners Core Java Hi Sir/Madam,
Can u please explain about the Double in java.
I have problem with Double datatype.
public class DoubleTesting {
public static void main(String[] args) {
Double amt=137.17*100
core java - Java Beginners core java pl. tell me about call by value and call by reference... change the fields in the caller?s objects they point to. In Java, you cannot...
System.out.println("Massage 2: i= " + i + ", d= " + d);
Double(i, i); //Java
core java - Java Beginners core java Hi Guys,
what is the difference between comparable and comparator i want with source code with example?????????????
plzzzzzzzzzzz help me its very urgent in advance thanks If you want to sort