Forums Register Login

Biggest method in java?

+Pie Number of slices to send: Send
Hi just curious to know which is the biggest method (line size) in the java API.Does anyone know?
+Pie Number of slices to send: Send
there's a theoretical limit of 65 kilobytes of bytecode per method.
How many lines of code that leads to will depend on the code.
A single statement can lead to a lot of bytecode.

If you've ever created complex JSPs and forgot to split them up and use dynamic includes you'll have run up against this limit
+Pie Number of slices to send: Send
Hi Jeroen,
Didnt understand by what "there's a theoretical limit of 65 kilobytes of bytecode per method" means
+Pie Number of slices to send: Send
When you write a method, you compile it into bytecode. this is the language that the JVM understands and translates into the machine-specific intructions at runtime.

anyway, there is not a 1-1 correspondence between a line of java and a line of bytecode. one 15 character line of java might translate to 5-6 lines of bytecode of 10 characters each.

the total amount of bytecode for a single method cannot exceed 65k in size.

at least, i think that's what Jeroen means.
+Pie Number of slices to send: Send
that's indeed what I meant. Thought I was clear
+Pie Number of slices to send: Send
i guess my italicized 'think' was more because i sometimes doubt myself rather than because i didn't understand what you meant.

maybe i should have italicized the "i" instead.

sorry.
+Pie Number of slices to send: Send
Where can I find more info on this ?In the VM spec?
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 699 times.
Similar Threads
Finding the maximum of an array without using a loop
something don't understand about SCEA
Retreive Data from DB thru Web Services
Java CMS
Java/C++ performance issues
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:49:38.