• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

2 public classes in the exam

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I was doing the Mater Exam in K&B and realised one of the questions had
2 public classes (outer). Nothing was metioned about the files in which the classes were declared.
- In the answer there was one choice that said - compiler error, but that compiler error did not mention anything about 2 public classes in a file.
I assumed that the classes were in 2 different files and proceeded to answer the question.
Is this a correct assumption for the actual test.
Thanks for your time and help
Sumit
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes
 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.
I had read somewhere, that there could be cases in the exam where none of the options given are correct. Under that circumstances, it is best to leave the question alone - answered.
Is that correct ?
Thanks again
 
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sopal
I would suggest that in case you think that none of the options are correct or more/less than the asked options are correct then go by your instinct, think what the paper setter might have thought about this question.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sopal Pal:
I had read somewhere, that there could be cases in the exam where none of the options given are correct. Under that circumstances, it is best to leave the question alone - answered.
Is that correct ?
Thanks again

When I took the test it did not permit me to finish unless every question was answered so I would say that you are incorrect.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going out on a limb here because I either don't know or don't remember the question, but were the two classes each numbered starting at 1 (or within different sequences that each started at line 1)? Remember how they described the line numbering convention, so if you have two line 1 entries, that would indicate two separate files in all likelihood.
Ross
70.5 hours and counting to completion! (not that I'm keeping track or anything)
 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is on Q:47 for exam 310-035
This question reads as follows : ( Also there are no line numbers alongside)
Given the following
public class A {
public void m1(){
System.out.print("ma");
}
}
public class B extends A{
public static void main(String [] args){
A a = new B();
a.m1();
}
public void m1(){
{
System.out.print("mb");
}
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic