Click here to Skip to main content
16,007,163 members
Home / Discussions / Java
   

Java

 
QuestionEfficient way of printing elements in Java?! Pin
Rajdeep.NET24-Jul-09 8:36
Rajdeep.NET24-Jul-09 8:36 
AnswerRe: Efficient way of printing elements in Java?! Pin
fly90424-Jul-09 8:42
fly90424-Jul-09 8:42 
AnswerRe: Efficient way of printing elements in Java?! Pin
Nagy Vilmos27-Jul-09 3:37
professionalNagy Vilmos27-Jul-09 3:37 
AnswerRe: Efficient way of printing elements in Java?! Pin
EliottA5-Aug-09 9:12
EliottA5-Aug-09 9:12 
QuestionRun ruby code on java Pin
xax24-Jul-09 6:15
xax24-Jul-09 6:15 
AnswerRe: Run ruby code on java Pin
Kujtim Hyseni25-Jul-09 0:59
Kujtim Hyseni25-Jul-09 0:59 
QuestionReference in Java Pin
Kujtim Hyseni24-Jul-09 5:32
Kujtim Hyseni24-Jul-09 5:32 
AnswerRe: Reference in Java Pin
David Skelly24-Jul-09 6:12
David Skelly24-Jul-09 6:12 
In Java, all method parameters are passed by value, not by reference.

In other words, when you call varbyteobject in your code, it does not pass the reference to the original byte array. It passes a copy of the reference to the byte array. So, this line of code:

obj=new byte[rndlen];


has no effect on the original reference to the byte array in the calling main method since you are updating the copy, not the original.

It is explained in more detail in this article:

http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html[^]

You can just return the new byte array from your method. Why do you want to return a boolean?
AnswerRe: Reference in Java Pin
fly90424-Jul-09 6:21
fly90424-Jul-09 6:21 
AnswerRe: Reference in Java Pin
Kujtim Hyseni24-Jul-09 7:02
Kujtim Hyseni24-Jul-09 7:02 
GeneralRe: Reference in Java Pin
David Skelly26-Jul-09 22:35
David Skelly26-Jul-09 22:35 
GeneralRe: Reference in Java Pin
Kujtim Hyseni27-Jul-09 1:38
Kujtim Hyseni27-Jul-09 1:38 
GeneralRe: Reference in Java Pin
David Skelly27-Jul-09 2:18
David Skelly27-Jul-09 2:18 
AnswerRe: Reference in Java [modified] Pin
Kujtim Hyseni27-Jul-09 3:36
Kujtim Hyseni27-Jul-09 3:36 
GeneralRe: Reference in Java Pin
David Skelly27-Jul-09 5:34
David Skelly27-Jul-09 5:34 
GeneralRe: Reference in Java Pin
Nagy Vilmos27-Jul-09 5:54
professionalNagy Vilmos27-Jul-09 5:54 
QuestionIs Javascript question allowed here??? Pin
kKamel22-Jul-09 0:34
kKamel22-Jul-09 0:34 
AnswerRe: Is Javascript question allowed here??? Pin
fly90422-Jul-09 0:41
fly90422-Jul-09 0:41 
GeneralRe: Is Javascript question allowed here??? Pin
Nagy Vilmos22-Jul-09 0:42
professionalNagy Vilmos22-Jul-09 0:42 
GeneralRe: Is Javascript question allowed here??? Pin
kKamel22-Jul-09 0:49
kKamel22-Jul-09 0:49 
GeneralRe: Is Javascript question allowed here??? Pin
Nagy Vilmos22-Jul-09 1:41
professionalNagy Vilmos22-Jul-09 1:41 
QuestionIs there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
AshishAshish21-Jul-09 2:51
AshishAshish21-Jul-09 2:51 
AnswerRe: Is there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
fly90421-Jul-09 3:35
fly90421-Jul-09 3:35 
GeneralRe: Is there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
AshishAshish23-Jul-09 3:09
AshishAshish23-Jul-09 3:09 
GeneralRe: Is there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
fly90423-Jul-09 3:44
fly90423-Jul-09 3:44 

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.