Click here to Skip to main content
15,904,652 members
Home / Discussions / Java
   

Java

 
GeneralRe: simple and basic Array Question Pin
Richard MacCutchan9-Jun-17 7:46
mveRichard MacCutchan9-Jun-17 7:46 
GeneralRe: simple and basic Array Question Pin
Member 125938659-Jun-17 9:34
Member 125938659-Jun-17 9:34 
GeneralRe: simple and basic Array Question Pin
Richard MacCutchan9-Jun-17 22:08
mveRichard MacCutchan9-Jun-17 22:08 
GeneralRe: simple and basic Array Question Pin
Member 1259386510-Jun-17 7:25
Member 1259386510-Jun-17 7:25 
GeneralImplementing the Artificial Neural Network - Java Pin
Member 132411095-Jun-17 0:27
Member 132411095-Jun-17 0:27 
GeneralRe: Implementing the Artificial Neural Network - Java Pin
harold aptroot5-Jun-17 1:35
harold aptroot5-Jun-17 1:35 
GeneralRe: Implementing the Artificial Neural Network - Java Pin
Member 132411095-Jun-17 7:44
Member 132411095-Jun-17 7:44 
QuestionGeneric List and request.getParameterValues Pin
karengsh3-Jun-17 22:20
karengsh3-Jun-17 22:20 
Hi experts,

I hope someone can tell me how to write the code which I have stumbled :

Java
<pre>subject m = new subject();
List<subject>subject = new ArrayList<subject>();		
String[] subjects = subject.toArray(new String[subject.size()]);
subjects = request.getParameterValues("subject"); // reading in the names from ticked checkboxes by user			
for (int i = 0; i< subjects.length; i++){
if (subjects != null) {
//subject.add(subjects[i]); // ??? this is the part that I do not know what to do .
//	}
m.setSubjects(subject);	
   mgr.insertSubject(m);   




Basically, I do not know how do I add the subjects into generic List<subject>subject.
Hope someone can guide me here.

Tks.
AnswerRe: Generic List and request.getParameterValues Pin
Afzaal Ahmad Zeeshan5-Jun-17 8:28
professionalAfzaal Ahmad Zeeshan5-Jun-17 8:28 
AnswerRe: Generic List and request.getParameterValues Pin
Richard Deeming5-Jun-17 8:29
mveRichard Deeming5-Jun-17 8:29 
GeneralRe: Generic List and request.getParameterValues Pin
karengsh6-Jun-17 17:56
karengsh6-Jun-17 17:56 
GeneralRe: Generic List and request.getParameterValues Pin
Richard MacCutchan6-Jun-17 23:00
mveRichard MacCutchan6-Jun-17 23:00 
GeneralRe: Generic List and request.getParameterValues Pin
karengsh8-Jun-17 5:56
karengsh8-Jun-17 5:56 
GeneralRe: Generic List and request.getParameterValues Pin
Richard MacCutchan8-Jun-17 21:52
mveRichard MacCutchan8-Jun-17 21:52 
QuestionHelp with calling .length on an array Pin
m009le2-Jun-17 10:50
m009le2-Jun-17 10:50 
AnswerRe: Help with calling .length on an array Pin
Member 121394422-Jun-17 11:20
Member 121394422-Jun-17 11:20 
AnswerRe: Help with calling .length on an array Pin
Richard MacCutchan2-Jun-17 22:17
mveRichard MacCutchan2-Jun-17 22:17 
AnswerRe: Help with calling .length on an array Pin
jdferrell17-Jul-17 15:09
professionaljdferrell17-Jul-17 15:09 
Questionunable to pass array index value in the form of a variable in jsp and javascript Pin
a a nizami31-May-17 21:12
a a nizami31-May-17 21:12 
AnswerRe: unable to pass array index value in the form of a variable in jsp and javascript Pin
Richard MacCutchan31-May-17 22:30
mveRichard MacCutchan31-May-17 22:30 
QuestionCopying the array Pin
Member 1322889629-May-17 3:53
Member 1322889629-May-17 3:53 
QuestionAccess to Active Directory (Java) Pin
Member 1213944227-May-17 9:34
Member 1213944227-May-17 9:34 
AnswerRe: Access to Active Directory (Java) Pin
Richard MacCutchan27-May-17 20:58
mveRichard MacCutchan27-May-17 20:58 
QuestionAnt colony system for solving a shortest path in a multimodal transport Pin
Member 1322085424-May-17 10:07
Member 1322085424-May-17 10:07 
AnswerRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Richard MacCutchan24-May-17 21:15
mveRichard MacCutchan24-May-17 21:15 

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.