Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

Q&A 369

Q&A


Q. Why is Eclipse used to create Android apps instead of NetBeans?
A. Yo u c a n u s e N e t B e a n s t o d e v e l o p a p p s ,but it’s a more cumbersome
and less well-supported IDE for Android programming. Eclipse has been
designated by Google as the preferred Android IDE. The official docu-
mentation and tutorials on the Android Developer site at http://
developer.android.com all use Eclipse.
Most programming books for Android also employ Eclipse. Although
there’s a learning curve required to switch from NetBeans to Eclipse
when you dive into Android,after you master the basics of writing,
debugging,and deploying an app,you should find Eclipse easier to use
because it’s so much better supported by programmers and technical
writers.

Q. How does ProGuard make it harder for an app’s source code to be
decompiled?
A. Java class files are susceptible to being reverse engineered,which is
the process of taking executable code and figuring out the source code
that was used to create it. Because the designers of Android apps
might not want other developers to copy their source code in their own
apps,ProGuard is available in every Android project you create.
ProGuard optimizes an app by removing unused code from its class
files when they’re compiled. ProGuard also obfuscates code by chang-
ing the names of classes,fields,and methods to something meaning-
less and obscure. That way,even if someone decompiles the Java
code,the source code is a lot harder to figure out.
The obfuscation feature only is applied when an app is built in release
mode. Doing it earlier than that would make debugging much more diffi-
cult.

Q. Why do so many movies have the same exact sound of a man scream-
ing in anguish?
A. That sound’s the Wilhelm scream,a sound effect that was heard first in
the 1951 movie Distant Drums. It turns up most often when somebody
falls from a great height,is shot by a gun,or knocked back by an explo-
sion. Two famous uses are in the original Star Wars, when a stormtrooper
is shot by Luke Skywalker and falls off a ledge,and in the animated movie
Toy Stor ywhen Sheriff Woody knocks Buzz Lightyear out the window.
Free download pdf