Click here to Skip to main content
15,880,608 members
Home / Discussions / Java
   

Java

 
GeneralRe: Connection to server Pin
Member 1351533211-Nov-17 0:18
Member 1351533211-Nov-17 0:18 
GeneralRe: Connection to server Pin
Richard MacCutchan11-Nov-17 2:10
mveRichard MacCutchan11-Nov-17 2:10 
GeneralRe: Connection to server Pin
jschell15-Nov-17 7:48
jschell15-Nov-17 7:48 
Questionjava jee Pin
Member 135124279-Nov-17 4:14
Member 135124279-Nov-17 4:14 
AnswerRe: java jee Pin
Richard MacCutchan9-Nov-17 4:29
mveRichard MacCutchan9-Nov-17 4:29 
GeneralRe: java jee Pin
Member 135124279-Nov-17 4:57
Member 135124279-Nov-17 4:57 
AnswerRe: java jee Pin
Manish K. Agarwal9-Nov-17 5:10
Manish K. Agarwal9-Nov-17 5:10 
QuestionJava Code using the List Interface not Compiling Pin
BobInNJ8-Nov-17 10:14
BobInNJ8-Nov-17 10:14 
Please consider the following Java fragment where there are two classes defined: Tire and Radial. The class Radial has Tire has its super class. That is, Radial extends Tire.
    public static void addBrandTires(List<Radial> parts1, List<? extends Tire> parts2,
            String brand)
    {
        ListIterator<Radial> li = parts1.listIterator();
        while ( li.hasNext() ) {
            Radial t1 = li.next();
            if ( t1.getBrand().equals( brand) ) {
                parts2.add( t1 );
            }
        }
    }
The call to add generates the following compiler error:
error: no suitable method found for add(Radial)
parts2.add( t1 );
Since t1 is of type Radial, it is of type Tire therefore I expected it to work. I tired putting in a cast of t1 but that did not work either.

Bob

-- modified 8-Nov-17 16:23pm.
AnswerRe: Java Code using the List Interface not Compiling Pin
Afzaal Ahmad Zeeshan8-Nov-17 13:47
professionalAfzaal Ahmad Zeeshan8-Nov-17 13:47 
GeneralRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan8-Nov-17 22:10
mveRichard MacCutchan8-Nov-17 22:10 
GeneralRe: Java Code using the List Interface not Compiling Pin
Afzaal Ahmad Zeeshan9-Nov-17 0:22
professionalAfzaal Ahmad Zeeshan9-Nov-17 0:22 
GeneralRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan9-Nov-17 1:12
mveRichard MacCutchan9-Nov-17 1:12 
AnswerRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan8-Nov-17 22:06
mveRichard MacCutchan8-Nov-17 22:06 
AnswerRe: Java Code using the List Interface not Compiling Pin
vishaljamdagni7-Feb-18 1:21
professionalvishaljamdagni7-Feb-18 1:21 
QuestionError Trapping this statement Pin
Member 135080347-Nov-17 2:59
Member 135080347-Nov-17 2:59 
AnswerRe: Error Trapping this statement Pin
Richard MacCutchan7-Nov-17 3:31
mveRichard MacCutchan7-Nov-17 3:31 
GeneralRe: Error Trapping this statement Pin
Member 135080347-Nov-17 5:28
Member 135080347-Nov-17 5:28 
GeneralRe: Error Trapping this statement Pin
Richard MacCutchan7-Nov-17 6:56
mveRichard MacCutchan7-Nov-17 6:56 
GeneralRe: Error Trapping this statement Pin
Member 135080347-Nov-17 7:23
Member 135080347-Nov-17 7:23 
AnswerRe: Error Trapping this statement Pin
jschell8-Nov-17 7:29
jschell8-Nov-17 7:29 
AnswerRe: Error Trapping this statement Pin
ZurdoDev8-Nov-17 7:44
professionalZurdoDev8-Nov-17 7:44 
QuestionPlacing 2DArray Values into x, y locations Pin
Member 135019553-Nov-17 7:35
Member 135019553-Nov-17 7:35 
QuestionIS anybody knows how to convert HTML to XML file USING java Pin
Raaz db Bengalore3-Nov-17 3:12
Raaz db Bengalore3-Nov-17 3:12 
AnswerRe: IS anybody knows how to convert HTML to XML file USING java Pin
jschell3-Nov-17 6:47
jschell3-Nov-17 6:47 
GeneralRe: IS anybody knows how to convert HTML to XML file USING java Pin
Raaz db Bengalore3-Nov-17 20:54
Raaz db Bengalore3-Nov-17 20:54 

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.