• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

q from TestCafe.com

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I was nt able to answer this q since I didnt know the value of '\0042'
please let me know whether such q come up in the real exam and if so, where can i find a list of such constants?
 
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
'\u0042' is B

Appendix B of the Java Programming Language , 3rd Edition, had a Unicode table. You could also google "Unicode".


There is an exam objective:
State the range of all primitive formats, data types and declare literal values for String and all primitive types using all permitted formats bases and representations.

I personally plan on memorizing all Unicode blocks including Gurmukhi, Gujarati, Oriya, and Telugu, but that might be overkill (lol).
[ December 24, 2004: Message edited by: Mike Gershman ]
 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"I wasn't able to answer this q since I didn't know the value of '\u0042' "

A couple of things: first, although you didn't know the value of '\u0042', you should still be able to eliminate the choices that read "prints A", "prints A,B,C,Default", and "prints Default" because those choices do not rely on your knowing the value of '\u0042'; those choices rely on your knowledge of the switch statement. Once you eliminate those choices, you have a 50-50 chance between "Prints Default A,B,C" and "Prints B,C".

Second, in the years that I've been programming, I've memorized only a few values from the ASCII table (which maps into Unicode):

Briefly, I've memorized NUL because it is used so much by C/C++ programmers; LF and CR from parsing files, and although I know one is 10 and the other 13, I'm never really sure which is Rosencrantz and which is Guildenstern; (Space) because it is important and an island unto itself; '0' because I can figure out all the other base 10 digits by adding 48 to their offsets; and 'A' and 'a' because similar to numbers, I can figure out all upper and lower case letters by adding 'A' or 'a' to their offsets in the alphabet.

In effect, I can quickly figure out 66 ASCII values by knowing seven values in the ASCII table. These are perhaps also the 66 most commonly found and important to know.

Finally, all I really know from the table are the ASCII values (e.g., 'A') and their decimal equivalents (e.g., 65). I do a quick hex computation as needed.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic