Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help2200


This forum is provided to promote discussion amongst students enrolled in Data Structures and Algorithms (CITS2200).
 
Options:
RSS cloud
Jump to:

Unchecked cast from object to E

1 of 418 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Tue 24th Mar, 6:11pm
Actions: 
        Login-to-reply

 

For Dequeue lab:

Using the Dequeue interface in CITS2200:

e.g peekRight() returns an E

Stored in Object[], when I get the item I cast the object to E

ie. return (E)queue[1] 

However I get a Unchecked cast from object to E warning. Google suggests suppressing 
it, but it doesnt see like the correct way to do it. The error shows up on the 
cssumbit near the top, even though its full marks.

Related articles

Unchecked cast from object to E (all 4) RSS
├─ THIS   Tue 24th Mar, 6:11pm, ANONYMOUS
├─ reply 1   Tue 24th Mar, 9:16pm, Xi R.
├─ reply 2   Wed 1st Apr, 10:20am, ANONYMOUS
└─ reply 3   Wed 1st Apr, 10:25am, ANONYMOUS
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020