Week 1 - Programming Foundations - Learn basic programming constructs using Java Flashcards
What is a Full Stack Developer?
Full-stack developers straddle two separate development domains: the front end and the back end.
Those knowledgeable in both front end and back end are called full stack developers, meaning they are well versed in both disciplines.
What is a front-end developer?
They work to optimize the visible parts of an application for web browsers and mobile devices.
Front end platforms are usually built with HTML, CSS, and JavaScript; however, they can also be made via pre-packaged code libraries or content management systems like WordPress.
What is a back-end developer?
refine the software code that communicates with servers, databases, or other proprietary software that conveys information to front end interfaces
What class is used to read from the console
Scanner class
what do the following read?
nextBoolean()
nextByte()
nextDouble()
nextFloat()
nextInt()
nextLine()
nextLong()
nextShort()
Reads a boolean value from the user
Reads a byte value from the user
Reads a double value from the user
Reads a float value from the user
Reads a int value from the user
Reads a String value from the user
Reads a long value from the user
Reads a short value from the user
Java syntax to input an object and hold the string input?
Scanner sc = new Scanner(System.in);
String name = sc.nextLine();
What is the Scanner class used for?
Parsing input from text into primitives and strings, from a File or InputStream
Who invented Java?
Java was invented at Sun Microsystems by a team led by James Gosling. It was first released in 1995.
Who currently maintains Java?
Java is currently owned and maintained by the Oracle Corporation, which acquired Java when it acquired Sun Microsystems in 2010.
Why Java? What are the advantages?
Java is a high-level, compiled, strongly typed object-oriended programming (OOP) language. The advantages of Java are many: it is platform independent, has a C-language inspired syntax, provides automatic memory management, has an extensive built-in runtime library, is supported by the Oracle corporation, and has a rich open source community
What is “object-oriented”?
It has the constructs of classes and objects built into the language. It also allows us to use various principles of object-oriented programming.
What are classes?
They are the blueprints for how to create objects that contain a certain state - which is represented by fields (variables) - and behavior - which is defined via methods.
What are objects?
They are instances of class definitions. Each object has an identity, a behavior, and a state. They are logical entities.
Java is not 100% object-oriented because _____
it still has primitive values
What are the 8 primitive values?
byte: an 8-bit integer value.
short: a 16-bit integer value.
int: a 32-bit integer value.
long: a 64-bit integer value.
float: a single-precision 32-bit floating point value.
double: a double-precision 64-bit floating point value.
boolean: a true/false value.
char: a 16-bit Unicode character value.
Why are primitive values “primitive”?
These types are called “primitive” because they are not objects; they do not have methods or attributes like objects do. Instead, they are simple values that can be assigned, compared, and used in arithmetic operations. Primitive values are stored directly in memory and can be accessed quickly, which makes them more efficient than objects in terms of memory usage and performance.
Which two constructs characterize an object-oriented programming language?
Classes and objects.
This line declares a method called main
public static void main(String[] args)
A method is…?
An executable element inside a class
A reference variable is…?
A variable that stores the reference to an object in memory
What does compilation mean?
to transform a program written in a high-level programming language from source code into object code.
Source code must go through several steps before it becomes an executable program. Explain the two steps.
The first step is to pass the source code through a compiler, which translates the high-level language instructions into object code.
The final step in producing an executable program — after the compiler has produced object code — is to pass the object code through a linker. The linker combines modules and gives real values to all symbolic addresses, thereby producing machine code.