Click here to Skip to main content
14,456,063 members
   

Java

 
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 
AnswerRe: Java Code using the List Interface not Compiling Pin
Afzaal Ahmad Zeeshan8-Nov-17 14:47
mvaAfzaal Ahmad Zeeshan8-Nov-17 14:47 
It might be that you are missing the fact that Java requires you to pass an index for the element to be inserted at as well.

Try this,
// Inserts at location 0.
parts2.add(0, t1);
Also, if you need some other logic then implement that and change the "0" to a dynamic and controlled variable.
Java.util.ArrayList.add(int index, E elemen) Method Example

As to why you are facing this problem, read about the Capture Conversion, What is a capture conversion in Java and can anyone give me examples? - Stack Overflow
java - How can I add to List<? extends Number> data structures? - Stack Overflow

Lastly, it is much simpler to work with ArrayList<T> in Java as compared to working with List<T> in Java. ArrayList<T> would be much better alternative to your types in the code above. ArrayList<T> contains List<T> in the inheritance chain. See the documentation for more on that.
ArrayList (Java Platform SE 8 )
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

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 
GeneralRe: IS anybody knows how to convert HTML to XML file USING java Pin
Richard MacCutchan4-Nov-17 22:09
communityengineerRichard MacCutchan4-Nov-17 22:09 

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.