• Post Reply Bookmark Topic Watch Topic
  • New Topic

threads in java  RSS feed

 
evy kahalni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey i have assigment to do and iam not quite understand how to continue with this if someone can help me i will be thankfull.
so i need to make 3 classes
1.class matrix  already done.




2)class matrixcounter ;


now in the run method i need that thread will pass on the matrix and thw specific row that he got ..and add all the element to the matrixsum..how i do it?
 
praveen kumaar
Ranch Hand
Posts: 461
22
Android Chrome Eclipse IDE Google App Engine Java Notepad Oracle Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
evy wrote:now in the run method i need that thread will pass on the matrix and thw specific row that he got ..and add all the element to the matrixsum..how i do it?


I don't get it.can you explain a bit more about the requirement of the Thread part.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Why do you need a separate Thread? Is this an exercise about Threads? Have you written on paper how you would add a row in a matrix? When you have one that, you can simply convert it to code.
 
evy kahalni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Welcome to the Ranch

Why do you need a separate Thread? Is this an exercise about Threads? Have you written on paper how you would add a row in a matrix? When you have one that, you can simply convert it to code.


its exrcise from school..im stuck 3 days trying to think sbout the solution but still having a hard time .
 
evy kahalni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
praveen kumaar wrote:
evy wrote:now in the run method i need that thread will pass on the matrix and thw specific row that he got ..and add all the element to the matrixsum..how i do it?


I don't get it.can you explain a bit more about the requirement of the Thread part.


The department's function run (run), says the thread will switch matrix line matrix row received, and Iscom it. At the end agreed, it will continue to the agreement, an amount that already exists in the variable MatrixSum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!