View Single Post
  #2 (permalink)  
Old 10-31-2007, 12:15 AM
ShoeNinja's Avatar
ShoeNinja ShoeNinja is offline
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
Tricky question. Everything in Java is passed by value. Objects are actually never passed, only references to objects. This makes it sound like objects are passed by reference but they are NOT.

Code wise, objects are passed like any other variable.

Code:
Person guy = new Person(); Person girl = new Person(); guy.shakeHands(girl); public class Person(){ public void shakeHands(Person shakee){ } }
As far as JSP pages go, that's a pretty broad question. The most basic way is something like this:

Code:
<%= object.toString(); %>
I know this works for return types of Strings and ints. It might work for others but I'm not 100% sure.

Last edited by ShoeNinja : 10-31-2007 at 12:19 AM.
Reply With Quote