Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal modifier for parameter count; only final is permitted

Tags:

java

I new to Java and I have a problem, When i try making a public/private variable EXAMPLE: private int varName; Eclipse gives me an error: Illegal modifier for parameter count; only final is permitted

like image 953
user3421750 Avatar asked Dec 02 '25 01:12

user3421750


1 Answers

Local variables and parameters cannot have public or private modifier. You can only give final to them. Not even static can be used.

like image 121
Rohit Jain Avatar answered Dec 03 '25 14:12

Rohit Jain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!