Original Post
Im trying to make some of my c++ functions in java I didnt think it would be very hard but now I am wondering how to do certain things without pointers. Alot of my functions work like that I have one that is used to get a web page and takes a pointer for the header and body to be stored in 2 different variables. I cannot do that in java and the only way I can think of would be make all of these into classes and that seems to be a overkill for each little thing.
Another thing that has me concerned is wouldnt passing by value be so much slower than just passing a pointer for certain things?
Is there a way I could make this work?
Another thing that has me concerned is wouldnt passing by value be so much slower than just passing a pointer for certain things?
Is there a way I could make this work?
public static void changestring(String hold){ hold = "jeff"; } public static void main(String[] args) { String hold = new String("ffej"); System.out.println(hold); changestring(hold); System.out.println(hold); }