dev-resources.site
for different kinds of informations.
Day 11 Encupsulation
Published at
12/18/2024
Categories
java
payilagam
encupsulation
Author
v_inoth_f0fad29baec4c
Author
21 person written this
v_inoth_f0fad29baec4c
open
Input 1:
class Friend1
{
String name;
long mobileNo;
int atmPin;
public Friend1(String name, long mobileNo, int atmPin)
{
this.name = name;
this.mobileNo = mobileNo;
this.atmPin = atmPin;
}
public static void main(String[] args)
{
Friend1 f1 = new Friend1("Kavin", 1234, 1111);
f1.withdraw();
}
private void withdraw()
{
System.out.println(atmPin);
}
public void tour()
{
System.out.println("Going for a ride");
}
public void publish_results()
{
System.out.println("Pass with good marks ");
}
}
Input 2:
class Friend2
{
public static void main(String[] args)
{
Friend1 ff = new Friend1("Arul", 3434, 2323);
ff.tour();
ff.withdraw();
}
}
Output:
payilagam Article's
30 articles in total
Python List Tutorial Day2
read article
System.out.println()
read article
Python List Tutorial
read article
String Functions Examples
read article
Front end day-1 (html,css)
read article
About IRC - Internet Relay Chat
read article
Python Day-29 Dictionary- Exercises, Tasks
read article
LCM & GCD of two numbers
read article
Weekend - Python Interview Questions
read article
Day14 Inheritance:
read article
Python day-28 Dictionary, Frequency of character using nested loops
read article
Objects
read article
System.out.println()
read article
Constructor
read article
Introduction
read article
Python Day-25 List functions, Tasks
read article
Day 12 Constructor in java:
read article
Day 4 - Dec 23 -->java simple program
read article
Day-5 Example for Encapsulation
read article
Day 11 Encupsulation
currently reading
Day 11 Today class:
read article
Day - 1 Task 1
read article
Day 10 Task:
read article
java task 3
read article
Day9 :Task2
read article
Java Constructors
read article
java task 3
read article
java 3 task
read article
java task1
read article
Python Day-23 Lists and list functions,Task
read article
Featured ones: