Java Flashcards
java: to write a comment type
//
java: java filenames end with
.java
java: Java is a
compiled language
java: a compiled language is one that
must be converted from human readable code to computer readable code before running.
java: javac is short for
java compiler
java: To run a java file that you have already compiled you type
java Filename
java: To compile a java file and then run it, type
javac Filename.java double ampersand
java Filename
java: Variables in java require you to
specify their type
java: To create a string variable, type
String myString = “string”;
java: To print a string with a variable in it to the console, type
console.printf(“I’m %s”, “Alen”)
java: do not forget
to end lines with a semicolon
java: To accept a user input into the console into a variable, type
String myString = console.readLine(“string”);
java: a multi line comment is denoted with
/* */
java: Java’s variable types are
int
String
boolean
java: To write a conditional statement, type
if (10 == 10) {
}
java: The global object that controls the system is called
System
java: To make the system object exit, type
System.exit(0);
System: Any exit code other than 0 means
that the program exited abnormally.
System: an exit code of 0 means
that the program exited intentionally.
java: To convert a string to an int, type
Integer.parseInt(intString);
java: To return a boolean of whether a string variable is the same as another string, type
myString.equals(“string”);
java: To return a boolean of whether a string variable is the same as another string case insensitive, type
myString.equalsIgnoreCase(“string”);
java: the “or” character for conditional statements is
||
java: the “and” character for conditional statements is
double ampersand
java: To run some code before entering a while loop, type
do {
} while {
}
java: Variables declared inside the do while loop are
not available outside it
android: IDE stands for
integrated development environment
android: Software you can write android apps in is called
Android Studio
android: When creating an android project, the package name
is your unique identifier that differentiates you from other developers on the play store. Make it unique upfront.
android: When creating an android project, the project name
is the name you will see in the play store, so make it correct up front.
android: Gradle is
the build system that builds android apps
android: To run your android app on your computer
press play on the toolbar press "..." build an emulator Make sure to use an "armeable" version of android. and keep the rest defaults press play again in the toolbar again choose the emulator in the dropdown
android: to regenerate all of the files
click the menu option, “build” then “clean project” and then “rebuild project”
android: The minimum SDK is
the lowest version of android our app works on.
android: To view almost any section of Android Studio
click the square in the bottom left corner and click on it in the dropdown
android: The file main/res contains
all of the resources or static files of the app
android: The file main/res/layout contains
all of the screens/views
android: Build time errors appear in
the bottom toolbar option “messages”