Click here to Skip to main content
15,908,675 members
Home / Discussions / Java
   

Java

 
QuestionBlock desktop until app running? Pin
Alok Sharma ji22-Feb-11 1:37
Alok Sharma ji22-Feb-11 1:37 
AnswerRe: Block desktop until app running? Pin
Nagy Vilmos22-Feb-11 1:45
professionalNagy Vilmos22-Feb-11 1:45 
AnswerRe: Block desktop until app running? Pin
TorstenH.23-Feb-11 20:07
TorstenH.23-Feb-11 20:07 
AnswerRe: Block desktop until app running? Pin
jschell24-Feb-11 11:59
jschell24-Feb-11 11:59 
GeneralRe: Block desktop until app running? Pin
Alok Sharma ji24-Feb-11 20:32
Alok Sharma ji24-Feb-11 20:32 
QuestionRecursion:Delete from a linkedList Pin
Brian Robertson21-Feb-11 22:08
Brian Robertson21-Feb-11 22:08 
AnswerRe: Recursion:Delete from a linkedList Pin
Nagy Vilmos22-Feb-11 1:44
professionalNagy Vilmos22-Feb-11 1:44 
AnswerRe: Recursion:Delete from a linkedList Pin
David Skelly22-Feb-11 1:50
David Skelly22-Feb-11 1:50 
As regards your second question, if you follow the compiler's advice and recompile with -Xlint:unchecked, you get the following warning:

warning: [unchecked] unchecked cast
found   : T
required: java.lang.Comparable<T>
    Comparable<T> temp = (Comparable<T>) val;
1 warning


In other words, there is no guarantee that the val being passed into the delete method will actually be a Comparable at runtime, so the cast may fail. This isn't a compilation error, because it will work if you do pass in a Comparable, but there is no way for the compiler to enforce this, so it is letting you know that this may be unsafe.


And as someone else has already pointed out, it's not clear why you are using compareTo instead of equals.
QuestionPalindrome assignment Pin
Chuon Visoth21-Feb-11 14:04
Chuon Visoth21-Feb-11 14:04 
AnswerRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:21
shivamkalra21-Feb-11 15:21 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:36
Chuon Visoth21-Feb-11 15:36 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:41
shivamkalra21-Feb-11 15:41 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:45
Chuon Visoth21-Feb-11 15:45 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:48
shivamkalra21-Feb-11 15:48 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:50
Chuon Visoth21-Feb-11 15:50 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:54
shivamkalra21-Feb-11 15:54 
AnswerRe: Palindrome assignment Pin
TorstenH.21-Feb-11 20:48
TorstenH.21-Feb-11 20:48 
GeneralRe: Palindrome assignment Pin
Chuon Visoth23-Feb-11 13:37
Chuon Visoth23-Feb-11 13:37 
GeneralRe: Palindrome assignment Pin
TorstenH.23-Feb-11 19:34
TorstenH.23-Feb-11 19:34 
QuestionDeveloping Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
eight20-Feb-11 16:23
eight20-Feb-11 16:23 
AnswerRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
Richard MacCutchan21-Feb-11 0:47
mveRichard MacCutchan21-Feb-11 0:47 
GeneralRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
eight21-Feb-11 16:22
eight21-Feb-11 16:22 
GeneralRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
Richard MacCutchan21-Feb-11 21:54
mveRichard MacCutchan21-Feb-11 21:54 
QuestionUtility calling Java application Pin
Indrojeet18-Feb-11 20:17
Indrojeet18-Feb-11 20:17 
AnswerRe: Utility calling Java application Pin
jschell19-Feb-11 9:10
jschell19-Feb-11 9:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.