Hello, am not sure if I understand correctly application of @SuppressWarnings("deprecation")
if I change main method as per below, should I know apply @SuppressWarnings("deprecation") in main method to eliminate the warning?
public class TestClass {
public static void main(String[] args) {
Account c = new Account();
}
}
About Question enthuware.ocpjp.v11.2.3395 :
Moderator: admin
-
- Posts: 22
- Joined: Thu Dec 09, 2021 11:23 pm
- Contact:
-
- Site Admin
- Posts: 9804
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v11.2.3395 :
Yes, if you call any deprecated method inside main, then you will get a deprecated warning at compile time and to eliminate that warning, you may apply the @SuppressWarnings on the main method.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 4 guests