Click here to Skip to main content
14,453,782 members
   

Java

 
GeneralRe: Connection to server Pin
Member 1351533211-Nov-17 1:18
MemberMember 1351533211-Nov-17 1:18 
GeneralRe: Connection to server Pin
Richard MacCutchan11-Nov-17 3:10
communityengineerRichard MacCutchan11-Nov-17 3:10 
GeneralRe: Connection to server Pin
jschell15-Nov-17 8:48
Memberjschell15-Nov-17 8:48 
Questionjava jee Pin
Member 135124279-Nov-17 5:14
MemberMember 135124279-Nov-17 5:14 
AnswerRe: java jee Pin
Richard MacCutchan9-Nov-17 5:29
communityengineerRichard MacCutchan9-Nov-17 5:29 
GeneralRe: java jee Pin
Member 135124279-Nov-17 5:57
MemberMember 135124279-Nov-17 5:57 
AnswerRe: java jee Pin
Manish K. Agarwal9-Nov-17 6:10
MemberManish K. Agarwal9-Nov-17 6:10 
QuestionJava Code using the List Interface not Compiling Pin
BobInNJ8-Nov-17 11:14
MemberBobInNJ8-Nov-17 11: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 14:47
mvaAfzaal Ahmad Zeeshan8-Nov-17 14:47 
GeneralRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan8-Nov-17 23:10
communityengineerRichard MacCutchan8-Nov-17 23:10 
GeneralRe: Java Code using the List Interface not Compiling Pin
Afzaal Ahmad Zeeshan9-Nov-17 1:22
mvaAfzaal Ahmad Zeeshan9-Nov-17 1:22 
GeneralRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan9-Nov-17 2:12
communityengineerRichard MacCutchan9-Nov-17 2:12 
AnswerRe: Java Code using the List Interface not Compiling Pin
Richard MacCutchan8-Nov-17 23:06
communityengineerRichard MacCutchan8-Nov-17 23:06 
AnswerRe: Java Code using the List Interface not Compiling Pin
vishaljamdagni7-Feb-18 2:21
professionalvishaljamdagni7-Feb-18 2:21 
QuestionError Trapping this statement Pin
Member 135080347-Nov-17 3:59
MemberMember 135080347-Nov-17 3:59 
AnswerRe: Error Trapping this statement Pin
Richard MacCutchan7-Nov-17 4:31
communityengineerRichard MacCutchan7-Nov-17 4:31 
GeneralRe: Error Trapping this statement Pin
Member 135080347-Nov-17 6:28
MemberMember 135080347-Nov-17 6:28 
GeneralRe: Error Trapping this statement Pin
Richard MacCutchan7-Nov-17 7:56
communityengineerRichard MacCutchan7-Nov-17 7:56 
GeneralRe: Error Trapping this statement Pin
Member 135080347-Nov-17 8:23
MemberMember 135080347-Nov-17 8:23 
AnswerRe: Error Trapping this statement Pin
jschell8-Nov-17 8:29
Memberjschell8-Nov-17 8:29 
AnswerRe: Error Trapping this statement Pin
ZurdoDev8-Nov-17 8:44
mveZurdoDev8-Nov-17 8:44 
QuestionPlacing 2DArray Values into x, y locations Pin
Member 135019553-Nov-17 8:35
MemberMember 135019553-Nov-17 8:35 
QuestionIS anybody knows how to convert HTML to XML file USING java Pin
Raaz db Bengalore3-Nov-17 4:12
MemberRaaz db Bengalore3-Nov-17 4:12 
AnswerRe: IS anybody knows how to convert HTML to XML file USING java Pin
jschell3-Nov-17 7:47
Memberjschell3-Nov-17 7:47 
GeneralRe: IS anybody knows how to convert HTML to XML file USING java Pin
Raaz db Bengalore3-Nov-17 21:54
MemberRaaz db Bengalore3-Nov-17 21: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.