java - bad operand type string for unary operator '+' -


i'm working on module class several student objects , have been experiencing following issue -

bad operand type string unary operator '+'

i appreciate assistance, code follows.

public class module { private string moduletitle; int percentagecoursework; int percentageexam; private student studentslist[] = new student[3];  public module (string moduletitle, int percentagecoursework, int percentageexam,string     studentone, string studenttwo, string studentthree, string studentstitles[]) {         this.moduletitle = moduletitle; this.percentagecoursework = percentagecoursework; this.percentageexam = percentageexam; this.studentslist[0].name = studentone; this.studentslist[1].name = studenttwo; this.studentslist[2].name = studentthree;  }             public void showdetails() {     system.out.println("moduletitle : " + moduletitle +              "\n percentagecoursework : " + percentagecoursework +              "\n percentageexam : " + percentageexam +              +studentslist[0].name+studentslist[1].name+studentslist[2].name);      } }  

    "\n percentageexam : " + percentageexam +      +studentslist[0].name+studentslist[1].name+studentslist[2].name); //  ^ //  ^ look! oh noes! 

there + in beginning of last line.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -