Lab: Reflection and Annotations -> 2.Getters and Setters
Здравейте колеги, може ли някой да сподели решение на задачата, защото вече не знам какво повече да опитам.
Условие:
2. Getters and Setters
Use reflection to get all Reflection methods. Then prepare an algorithm that will recognize, which methods are getters and setters. Sort each collection alphabetically by methods names. Print to console each getter on a new line in the format:
• "{name} will return class {Return Type}"
Then print all setters in the format:
• "{name} and will set field of class {Parameter Type}"
Do this without changing anything in "Reflection.java"
Моето решение: pastebin.com/LND1RWgq
Judge: Reflection - Lab - SoftUni Judge
Благодаря предварително!
Thank you for the fast response, but do you get 100/100 in judge? I tried your code and i found my mistakes, but still get 0 points in judge with both solutions. I start to think there is something wrong with judge.
Sorry, didn't try it out. Assumed that it was correct - could be that there is an issue with judge if the exercise has been updated. Give it a shot with the following:
Main.java:
GettersAndSetters.java:
Reflection.java:
It worked! Thank you again!