Hi,
Since interfaces variable are by default static and final.Can we assign a new value to the version variable in MediaReader class?
About Question enthuware.ocpjp.v7.2.1722 :
Moderator: admin
-
- Posts: 14
- Joined: Mon Jun 20, 2016 11:16 pm
- Contact:
-
- Site Admin
- Posts: 10391
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1722 :
You cannot change a final variable. So no, it is not possible to change version variable of Classic interface.
But MediaReader is not doing that. It has its own version variable.
But MediaReader is not doing that. It has its own version variable.
-
- Posts: 14
- Joined: Mon Jun 20, 2016 11:16 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1722 :
Got it.Thank you.
-
- Posts: 11
- Joined: Thu May 28, 2020 9:53 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1722 :
Why not we can have option 2 (Classic).version as it will call the classic version. With option 3 (Classic.this).version should call the version of MediaReader class as we are using this which takes current class reference. Please clarify.
-
- Site Admin
- Posts: 10391
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1722 :
Option 2 is (Classic)version; There is no dot. version is an int variable. How can you cast it to anything??
(Classic).version; is syntactically incorrect code.
(Classic).version; is syntactically incorrect code.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], lilmissyshar and 138 guests