Your SlideShare is downloading. ×
WAP to initialize different objects with different values in java
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

WAP to initialize different objects with different values in java

99
views

Published on

WAP to initialize different objects with different values in java

WAP to initialize different objects with different values in java

Published in: Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
99
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. //Ques. 4 WAP to initialize different objects with different values class different { int a,b,c; void initialize (int d,int e,int f) { a=d;a=e;c=f; } public static void main(String arr[]) { different mob = new different(); different code = new different(); int d,e; mob.a = 2; mob.b = 3; mob.c = 4; code.a = 4; code.b = 5; code.c = 6; d = mob.a* mob.b* mob.c; e = code.a* code.b* code.c; System.out.println(" n The Value of d is " +d); System.out.println("n The Value of e is " +e); } }
  • 2. OUTPUT :-