How many methods can be written in java class or interface


Contents of page >
  • How many methods can be written in java class or interface?
  • How java maintains count of number of methods written in java class or interface?

In this core java tutorial we will learn how many methods can be written in java class or interface and how java maintains count of number of methods written in java class or interface.

How many methods can be written in java class or interface?
Maximum of 65535 methods can be written in  class or interface in java (As per Java language specifications).

How java maintains count of number of methods written in java class or interface?
Java have ClassFile structure which have methods_count field which maintains count of number of methods written in java class or interface. methods_count field must not exceed 65535.

So, In this core java tutorial we learned many methods can be written in java class or interface and how java maintains count of number of methods in java class or interface.


Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.




RELATED LINKS>

Java 8 - MCQ set 1 (25 questions, 55 marks)

Thread Concurrency Java - MCQ set 1 (30 questions, 68 marks)

RegEx (Regular expression) tutorial with examples in java

File I/O in java - streams (Input/output), Readers/Writers, Buffered


eEdit
Must read for you :