View Single Post
  #1 (permalink)  
Old 10-30-2007, 09:28 PM
zen_to_go zen_to_go is offline
Member
 
Join Date: Oct 2007
Posts: 1
zen_to_go is on a distinguished road
Passing variable information between classes
This code works, I just want to know if the structure is good or bad?
I want to know your opinions on the best way to pass variable results
between classes.

If I write a class that calculates tax etc and I want to pass that result to another class to be used in an array or another calculation should I do it like this?




Code:
public class totalMe { private static String word; /** * @param args * @param word */ public static void main(String[] args) { smallSum sm = new smallSum(); System.out.print(sm.TheWord(word)); } } class smallSum{ public String TheWord(String word){ word ="did it work?"; return word; } }


Thanks for your time ---

ZTG
Reply With Quote
Sponsored Links