Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 25-02-07, 08:58 PM   #1 (permalink)
Senior Member
 
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0
Thanked 5 Times in 5 Posts
Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5 radhika743 is on a distinguished road
INTERFACE QUESTION.

Q.) Interfaces are syntactically similar to classes,But they lack to Instance Variables. This means that, Interface does not have variables.Then How Interface uses Variables?
radhika743 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 26-02-07, 02:05 PM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: INTERFACE QUESTION.

Radhika,

You can have variables within interfaces. By default, they are FINAL STATIC variables.

Thanks,
Krishna
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-02-07, 06:54 PM   #3 (permalink)
Member
 
Join Date: Jan 2007
Posts: 32
Thanks: 3
Thanked 3 Times in 3 Posts
Thanks: 3
Thanked 3 Times in 3 Posts
Rep Power: 2 Laxminarayanak will become famous soon enough
Re: INTERFACE QUESTION.

Radhika,
As kireeti said the Inteface can have variables. Those are Final and static by default it is right.
I think it might be useful info on this one thing is Interface and class are similar in structure the only difference is that the interface can't have implementation for the methods where as the class can have.

You can use the Interface variables like static variables of a class
for example in jdbc while creating the statement
we will use the properties to get the statment type
there we will use the ResultSet.CONCUR_READ_ONLY along the TRANSACTION_READ_COMMIT , etc.
__________________
Cheers,
Laxmi
Laxminarayanak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
JAVA Q&A part1 naga JAVA Technologies 2 27-04-07 12:53 PM
TATA ELAXSI placement paper 2 sridhar TATA ELXSI Placement Papers 0 12-02-07 04:10 PM
Abstract Classes versus Interfaces? radhika743 JAVA Technologies 5 16-01-07 07:54 PM
Interview questions you may be asked yathish HR Questions 6 24-12-06 08:35 PM
JAVA collection naga JAVA Technologies 0 21-02-06 06:01 AM


All times are GMT +6.5. The time now is 01:50 PM.





Search Engine Optimization by vBSEO 3.1.0