asked 129k views
0 votes
Is the following code legal? If not, why? TvShow.setActor1(“Jimmy Stewart”);

1 Answer

5 votes
Answer: It was written in the question the following: static public char ch = // wrong! The word "public" must come before "static", and since this is not the case here, the above statement is NOT a legal declaration of a class variable. public static char ch =; //
answered
User Dan Wagner
by
8.6k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.