Results 1 to 2 of 2
Thread: help with basic java code
- 08-07-2007, 06:42 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
help with basic java code
Can I this function better?
In C you normally sending a pointer to an array into the function but here I must convert the string to byte arrayJava Code://Calculate Csum A = A XOR B byte CountCsum(String m) { byte[] inData = m.getBytes(); byte csum=0; // Don't Count the first byte for(byte n=1;n<m.length();n++) csum ^= inData[n]; return csum; }
an that takes time and memory.
Are java sending a reference to the string or the entire string to the function??
- 08-07-2007, 06:47 PM #2
Member
- Join Date
- Jul 2007
- Posts
- 43
- Rep Power
- 0
Similar Threads
-
Basic Java help, AIM?
By jkswebsite in forum New To JavaReplies: 4Last Post: 07-11-2012, 06:17 PM -
basic java help
By adred in forum New To JavaReplies: 0Last Post: 03-08-2008, 12:36 PM -
java code
By sobhalr in forum New To JavaReplies: 0Last Post: 12-28-2007, 10:25 AM -
Help with basic shapes in java
By carl in forum Java 2DReplies: 1Last Post: 07-31-2007, 11:40 PM -
Help, basic shapes using java
By coco in forum AWT / SwingReplies: 1Last Post: 07-31-2007, 08:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks