• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Sybex CSG Chapter 2 #14 Question errata/precision/clarification?

 
Ranch Hand
Posts: 417
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

14. Which of the following statements about var are true? (Choose all that apply.)
A. A var can be used as a constructor parameter.
B. The type of var is known at compile time.
C. A var cannot be used as an instance variable.
D. A var can be used in a multiple variable assignment statement.
E. The value of var cannot change at runtime.
F. The type of var cannot change at runtime.
G. The word var is a reserved word in Java



In light of the "Do you think this is legal?" "Examples with var" very tricky section on page 57 (that I would post, but I think its overkill for this question), would it be more precise/unambiguous to specify "The type of var" in place of var in A & C above since var identifiers can be used?  Although, I answered it correctly, without knowing how many correct answers there are, I thought it was yet another trick (although appreciated) question:


Test
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic