Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

que from voodooexam

 
sanjana narayanan
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Question :
Given the following class
package org . myPack ;
public class Ques01 {
// some code
};
Which of the following are valid ways of refereing to the class from any other package besides org . myPack ?
Options :
a . Refer to the class as Ques01
b . Refer to the class as org . myPack . Ques01
c . Refer to the class as myPack . Ques01
d . import org . myPack . * & then refer to the class as Ques01
e . import org . * & then refer to the class as Ques01
My ans was b and d. The given ans are b,c. any explanations would be appreciated
-Sanajana
 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b d are the answers, you know why, right?
just be confident yourself, others people also make mistakes....
[ January 16, 2004: Message edited by: Yi Meng ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic