About Question enthuware.ocpjp.v11.2.3395 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
yuir12
Posts: 22
Joined: Thu Dec 09, 2021 11:23 pm
Contact:

About Question enthuware.ocpjp.v11.2.3395 :

Post by yuir12 »

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();
}
}

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v11.2.3395 :

Post by admin »

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.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 53 guests