Clemonte Johnstone

Ranch Hand
+ Follow
since Jan 05, 2021
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Clemonte Johnstone

Hi, is anyone able to help please in relation to the above?
Dear All,
Please could someone explain to me:

1) Why throws Exception is not allowed if supplemented below?
2) Can we say that we are overriding the method declaration in the Subclass?





The source of this question comes from the Online Udemy Course "Pass the Oracle Certified Associate(OCA): Java SE 8 Programmer I EXAM"
Instructor: Udayan Khattry
Can we also not say that X is an instance of X1?

Stephan van Hulst wrote:Then I'm afraid I can't help you further.



This is polymorphism right?


Stephan van Hulst wrote:

Clemonte Johnstone wrote:Its polymorphism as well right as X1 is instantiating X?


Can you elaborate on your question? I don't know what you mean.



I have nothing more to add. What I have stated should be enough information.

Paul Clapham wrote:

Stephan van Hulst wrote:What error message are you getting?



Come on. If your goal is to become a Java programmer, you should know by now that the error messages are there to tell you something about the problem.



Its polymorphism as well right as X1 is instantiating X?

Paul Clapham wrote:

Stephan van Hulst wrote:What error message are you getting?



Come on. If your goal is to become a Java programmer, you should know by now that the error messages are there to tell you something about the problem.



Apologies the code compiles. It was because of a duplicate class in my test suite. Its because I work very hard and have overlooked this yesterday. Sorry.

Clemonte Johnstone wrote:

Stephan van Hulst wrote:What error message are you getting? To me, that code looks valid and it should print "X3".


The code does not execute. It gives a compilation error on line 17



Its polymorphism as well right as X1 is instantiating X?

Stephan van Hulst wrote:What error message are you getting? To me, that code looks valid and it should print "X3".


The code does not execute. It gives a compilation error on line 17
Dear all,

Please could someone kindly explain why generates a compilation error? I do not think it is because it is NOT overriding the methods of X3. The IDE is not giving me any helpful info to determine the root cause. Thanks in advance for any help that you can give.

The source of this question comes from the Online Udemy Course "Pass the Oracle Certified Associate(OCA): Java SE 8 Programmer I EXAM"
Instructor: Udayan Khattry




Dear All,

Please can someone kindly explain why flag1 evaluates to true and flag2 evaluates to false? Many thanks for any help that you can give



The source of this question comes from the Online Udemy Course "Pass the Oracle Certified Associate(OCA): Java SE 8 Programmer I EXAM"
Instructor: Udayan Khattry
Dear All,

Please could someone explain why the output of this program is OutOfMemoryException: Java heap space?




The source of this question was taken from the Online Udemy Course "Pass the Oracle Certified Associate(OCA): Java SE 8 Programmer I EXAM"
Instructor: Udayan Khattry

Campbell Ritchie wrote:Please tell us what problem you are facing now.

Please don't quote the whole of the preceding post, which simply adds length to the discussion and no value. Such quotes are liable to removal.



I do not understand the explanation. Rephrasing the Key points would help me to understand
1 month ago
Thanks for attempting to explain. Difficult to digest. Its still not 100% clear.
1 month ago

Jason M smith wrote:while compiling with j
avac you must provide location of your java files.  When executing with java command, you should use classpath to set your class location, then use fully qualified name of your class containing main method.



Must this be done from the root directory as if I am outside src the above does not work for me?