PEP Revature Week 1

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/38

flashcard set

Earn XP

Description and Tags

Terms and Definitions Related to Entry Level Java Development.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

39 Terms

1
New cards

What is an Operating System (OS)?

Software that communicates with the hardware and allows other programs to run. It is comprised of system software, the files you need for your computer to boot up and function.

2
New cards

Process (Six Stages)

A process generally (though not always) passes through six different states: Start, Ready, Running, Waiting, Terminated, or Exit.

3
New cards

Thread

a flow of execution through the process code.

4
New cards

Scheduling

the process manager takes the responsibility to remove the running process from the CPU and chooses another process based on a specific strategy.

5
New cards

Memory Management

refers to the functionality of an operating system that handles and manages the primary memory.

6
New cards

Pros of Using Linux

  • choice and flexibility

  • Linux is free and open-sourced

  • It is easy to install directly on your computer, or you can boot Linux from an external drive like a USB flash drive or CD. You can also install it with or inside Windows if you need both.

  • Linux is famous for its stability and security.

  • It consumes a very limited amount of your computer's resources while operating. It is quite possible to run it using only 500 MB of drive space and 300 MB of ram.

  • Linux has many alternatives to nearly all the programs on the market like Photoshop, MS Word, etc. These also tend to be entirely free.

  • Linux has an amazing support community for troubleshooting

7
New cards

Cons of Using Linux

  • Learning Curve: Most users are already familiar with Windows/macOS, so switching to Linux requires learning new commands, system structures, and package management. This can be off-putting initially, but many resources are available to ease the transition.

  • Hardware Compatibility: While Linux supports a wide range of hardware, some peripherals (especially older ones) may require additional configuration or drivers to work properly.

  • Software Availability: Some proprietary software commonly used in development (e.g., Adobe products, MS Office) is not natively available on Linux, requiring alternatives or workarounds like Wine or virtual machines.

8
New cards

Pros of Using macOS

  • One pro to using macOS is its intuitive, simple, and clean user interface. This is especially true when comparing it to something like Windows. If you are developing apps for iOS systems, the similarity with macOS' UI is a great advantage.

  • Multitasking is at the heart of macOS. The operating systems come with various native features that really make having various programs open at one time a breeze to navigate and manage. The ability to switch between them at the press of a button saves tons of time, along with your sanity, especially in the long run.

  • macOS is optimized for software and hardware compatibility. This means that it runs with zero to minimal conflicts throughout the lifetime of the system.

  • macOS is also famed for its reduced susceptibility to malware and other security issues. While, like Linux, it is not immune to security issues, the chances of getting infected with a nasty piece of software are reduced when compared to Windows.

  • When developing apps and other software for Apple products, macOS provides seamless compatibility. macOS and iOS have a very similar user interface and workflow logic making it the perfect choice for such software development. Files and data are readily synchronized between devices and can be shared through their dedicated Apple cloud servers.

9
New cards

Cons of Using macOS

  • Limited software availability and choices compared to Windows/Linux.

  • Inflexible hardware upgrades and customization options, leading to high costs for future enhancements.

  • High initial cost of macOS devices can be a drawback for budget-conscious users.

10
New cards

Pros of Using Windows

  • Windows offers free access to great development integrated development environment (IDE) through the Visual Studio Community.

  • Windows, especially Windows 10, supports a wide swathe of hardware almost unparalleled in other operating systems. Since it is an incredibly popular operating system, a large proportion of hardware manufacturers support Windows before any other systems, although not always.

  • Not to labor the point, but as Windows is practically everywhere around the world, it tends to support the newest hardware that is released. Owing to its market dominance, most manufacturers will have some form of support for Windows somewhere. For users, especially businesses, Windows' "Plug and Play" function has proved to be a winning formula and not something to ignore. For this reason, you can readily build a computer of your dreams from scratch.

  • One of the biggest advantages of Windows over macOS is that it is, relatively speaking, a lot cheaper with regards to the hardware you need. But while you could conceivably get the latest version of Windows to work on a sub-$200 machine (cost of Windows license excluded), it won't be the most responsive option.

  • Having such huge market dominance, Windows also has a lion's share of software and applications catering to it. This gives a Windows user a big choice of tools.

11
New cards

Cons of Using Windows

  • As Windows is such a popular operating system, its success is also its weakness. Most malware, spyware, and ransomware viruses tend to target Windows operating systems. For this reason, Windows is one of the most vulnerable to such attacks.

  • As Windows allows for ease of customization, when it comes to hardware solutions, it can be problematic to get all the components to get along. Finding the right mix of drivers can cause some serious conflicts that could, conceivably, render your machine unworkable. But this can also prove to be a worthy challenge.

  • If you decide to buy an off the shelf computer with Windows pre-installed, the buyer (you) really should beware. Component quality, pre-ship testing, and long-term support can vary widely. Do your research first.

  • Forced updates. Windows tends to bloat very quickly and installs updates seemingly constantly. Not only that, but Windows has a history of apparently-botched update packages that can suddenly render some installed software and hardware unusable until a patch is created. This really is infuriating at times.

  • The most up-to-date Windows versions, like Windows 10, gather information related to contacts, location, calendar, and input (text and touch). The process for opting out of all data collection efforts is both time-consuming and requires a reasonable amount of technical know-how.

12
New cards

define Full Stack Developer

  • Full stack technology refers to the entire depth of a computer system application, and full stack developers straddle two separate development domains: the front end and the back end.

  • The front end includes everything that a client, or site viewer, can see and interact with.

  • By contrast, the back end refers to all the servers, databases, and other internal architecture that drives the application; usually, the end-user never interacts with this realm directly.

  • Front end developers 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.

  • Back end developers, in contrast, refine the software code that communicates with servers, databases, or other proprietary software that conveys information to front end interfaces.

  • Those knowledgeable in both front end and back end are called full stack developers, meaning they are well versed in both disciplines.

  • Today, modern businesses often rely on entire teams of developers to operate network equipment, work with virtual machines, and manage enormous databases.

    • It takes time to develop a comprehensive, nuts-and-bolts understanding of all these emerging technologies.

    • The developers who do so are, for that reason, versatile enough to shift fluidly between front and back end development and take on any task that their team might need them to tackle.

13
New cards

Identify at least three reasons to select Java as a programming language

Java is a high-level, compiled, strongly typed object-oriented programming (OOP) language.

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.

14
New cards

What makes a language Object Oriented?

it has the constructs of classes and objects built into the language.

15
New cards

List 5 real-world uses of Java

  1. Desktop GUI Applications

    • We use APIs like AWT, Swing, JavaFX to build these applications.

    • Examples of desktop GUI applications are Acrobat Reader, ThinkFree, Media Player, Antiviruses, etc.Mobile Applications

  2. Mobile Applications

    • A mobile application is an application created for mobile phones and tablets. In today’s era, the majority of phones and smart devices have Android OS and Android development is not possible without Java.

    • Examples of mobile applications are Photo and video gallery apps, Simple Calendar, Netflix, Tinder, QRReader, Google Earth, Uber, etc.

  3. Enterprise Applications

    • An enterprise application is a large software system which operates in a corporate environment, to satisfy the needs of an organization, rather than of individual users.

    • Examples of enterprise applications are Business corporations, schools, banks, ERP (Enterprise Resource Planning) and CRM (Customer Resource Management) systems, clubs, charities, governments, interest-based user groups, etc.

  4. Scientific Applications

    • A scientific application is an application that affects real-world activities using mathematics. Java supports the development of scientific applications, because of its powerful features.

    • Examples of scientific applications are applications related to research, science, medical science, space, aeronautics, etc.

  5. Web-based Applications

    • A web application is a client-server program that is delivered on the Internet through a browser interface.

    • Examples of web-based applications are irctc.co.in, online forms, shopping carts, Gmail, Google Sheets, Google Slides and many more.

  6. Embedded Systems

    • An embedded system, also known as an integrated system, is a combination of many small computing units that assemble together to perform dedicated functions for the larger systems.

    • Embedded systems are present everywhere. Don’t believe it? Most of us use them without knowing. For example, a motor system, entertainment and multimedia in a car, E-commerce, wireless communication, mobile computing and networking use an embedded system.

    • Embedded systems use Java for development. Originally, Java was designed for the purpose of developing embedded systems.

    • SIM (Subscriber Identity Module) cards in our phones have been running a variant of the JVM (Java Card) for nearly 20 years.

16
New cards

Stages of Compilation

Stage 1: Compilation

First, the source .java file is passed through the compiler, which then encodes the source code into a machine-independent encoding, known as bytecode. The content of each class contained in the source file is stored in a separate .class file. While converting the source code into the bytecode, the compiler follows the following steps:

  • Parse: Reads a set of *.java source files and maps the resulting token sequence into AST (Abstract Syntax Tree)-Nodes.

  • Enter: Enters symbols for the definitions into the symbol table.

  • Process annotations: If requested, processes annotations found in the specified compilation units.

  • Attribute: Attributes the Syntax trees. This step includes name resolution, type checking and constant folding.

  • Flow: Performs dataflow analysis on the trees from the previous step. This includes checks for assignments and reachability.

  • Generate: Generates .class files.

Stage 2: Execution

The class files generated by the compiler are independent of the machine or the OS, which allows them to be run on any system. To run, the main class file (the class that contains the method main) is passed to the Java Virtual Machine and then goes through three main stages before the final machine code is executed. These stages are:

  • ClassLoader : The main class is loaded into the memory by passing its .class file to the JVM, through invoking the latter. All the other classes referenced in the program are loaded through the class loader.

  • Bytecode Verifier : After the bytecode of a class is loaded by the class loader, it has to be inspected by the bytecode verifier, whose job is to check that the instructions don’t perform harmful actions. The following are some of the checks carried out:

    • Variables are initialized before they are used.

    • Method calls match the types of object references.

    • Rules for accessing private data and methods are not violated.

    • Local variable accesses fall within the runtime stack.

    • The run-time stack does not overflow.

  • Just-In-Time Compiler

    • This is the final stage encountered by the Java program, and its job is to convert the loaded bytecode into machine code.

    • When using a JIT compiler, the hardware can execute the native code, as opposed to having the JVM interpret the same sequence of bytecode repeatedly.

    • This can lead to performance gains in the execution speed for instructions that are repeatedly executed.

17
New cards

JDK, JRE, JVM

Programs that are written in Java are executed utilizing the Java Virtual Machine (JVM). The JVM is a special program that knows how to execute the programs that you write in Java.

The Java Virtual Machine is able to run our code because it runs our compiled bytecode. This is unique as it does this in a virtual environment that is the same across every platform. This is known as Write Once, Run Anywhere (WORA). However, the JVM that you use is specific to your operating system.

In order to run our code it has something in it called the Just-In-Time Compiler (JIT). The JIT turns your bytecode into machine code, in most instances on a line-by-line basis.

Thus, programs in Java are technically compiled twice.

In order to run Java code, you also need a Java Runtime Environment (JRE), which contains all the runtime libraries that your code will be calling and using. The JRE contains the JVM within it, so if you want to run a Java program, all you need to install is the JRE.

But how do we actually compile the Java code that we write down to bytecode that the JVM will understand? For that, you need a JDK - Java Development Kit, which provides developer tools like a compiler, debugger, documentation tools, and other command-line utilities. The JDK also has a JRE inside of it, so if you install a JDK you can compile your Java code as well as execute it.

<p>Programs that are written in Java are executed utilizing the Java Virtual Machine (JVM). The JVM is a special program that knows how to execute the programs that you write in Java.</p><p>The Java Virtual Machine is able to run our code because it runs our compiled bytecode. This is unique as it does this in a virtual environment that is the same across every platform. This is known as Write Once, Run Anywhere (WORA). However, the JVM that you use is specific to your operating system.</p><p>In order to run our code it has something in it called the Just-In-Time Compiler (JIT). The JIT turns your bytecode into machine code, in most instances on a line-by-line basis.</p><p>Thus, programs in Java are technically compiled twice.</p><p>In order to run Java code, you also need a Java Runtime Environment (JRE), which contains all the runtime libraries that your code will be calling and using. The JRE contains the JVM within it, so if you want to run a Java program, all you need to install is the JRE.</p><p>But how do we actually compile the Java code that we write down to bytecode that the JVM will understand? For that, you need a JDK - Java Development Kit, which provides developer tools like a compiler, debugger, documentation tools, and other command-line utilities. The JDK also has a JRE inside of it, so if you install a JDK you can compile your Java code as well as execute it.</p>
18
New cards

How do Operating Systems impact software development?

If programs you run seem slow, you should consider your operating system, you may be running out of memory or swap is in high usage

19
New cards

Main Method()

entry point to a Java program

20
New cards

method signature is comprised of?

access modifiers, non-access modifiers, return type, method name, and parameter list

21
New cards

What is a method?

is a block of reusable code that can be invoked as many times as we want.

22
New cards

Parts of a method

Method name, Method parameters, and Return type

23
New cards

Bitter Black Coffee Sure Is For Long Days

Boolean, Byte, Char, Short, Int, Float, Long, Double

24
New cards

Primitive Types

data types defined by the language itself

25
New cards

Reference Types

are types defined by the classes in the Java Application Programming Interface (API) or by classes you create

26
New cards

postfix

operators: x++ and x--

27
New cards

prefix

increment or decrement: ++x and --x

28
New cards

Logical operators

&&, || and !

29
New cards

Comperison Operators

  • == (equal to): Checks if two values are equal.

    • Example: a == b (true if a is equal to b).

  • != (not equal to): Checks if two values are not equal.

    • Example: a != b (true if a is not equal to b).

  • > (greater than): Checks if the left operand is greater than the right operand.

    • Example: a > b (true if a is greater than b).

  • < (less than): Checks if the left operand is less than the right operand.

    • Example: a < b (true if a is less than b).

  • >= (greater than or equal to): Checks if the left operand is greater than or equal to the right operand.

    • Example: a >= b (true if a is greater than or equal to b).

  • <= (less than or equal to): Checks if the left operand is less than or equal to the right operand.

    • Example: a <= b (true if a is less than or equal to b).

30
New cards

Ternary Operators

uses the following syntax: x = condition ? expr1 : expr2. If the condition is true, x is assigned the value of expr1; if the condition is false, expr2 is assigned.

31
New cards

Operator Precedence

Closer to the top is higher precedence

postfix

expr++ expr--

unary

++expr --expr +expr -expr ~ !

multiplicative

* / %

additive

+ -

shift

<< >> >>>

relational

< > <= >= instanceof

equality

== !=

bitwise

AND &

bitwise exclusive OR

^

bitwise inclusive OR

|

logical AND

&&

logical OR

||

ternary

? :

assignment

= += -= *= /= %= &= ^=

32
New cards

String Class and Methods

Strings are immutable in Java
toUpperCase() - Converts all the characters of a string to upper case.

  • toLowerCase()- Converts all the characters of a string to lower case

  • charAt(int index) - This returns the indexed character of a string, where the index of the initial character is 0

  • concat(String s) - This returns a new string consisting which has the old string + s

  • equals(String s) - Checks if two strings are equal

  • equalsIgnoreCase(String s) - This is like equals(), but it ignores the case(Ex: ‘Hello’ and ‘hello’ are equal)

  • indexOf(char c) - Returns the index of the first occurrence of a character within a String. Returns -1 if the character is not found.

  • length() - Returns the number of characters in the current string.

  • replace(char old, char new) - This returns a new string, generated by replacing every occurrence of old with new.

  • trim() - Returns the string that results from removing white space characters from the beginning and ending of the current string.

33
New cards

Stack Trace

Used for program debugging in the case something goes wrong, a stack trace shows you the exceptions that caused the program to fail

34
New cards

A Package

is a collection of classes, interfaces, and enums in a hierarchical manner.

35
New cards

Package Naming Convention

  • way of writing lowercase characters separated by periods in the reverse way you would specify a web domain - thus, com.revature.mypackage instead of mypackage.revature.com.

36
New cards

Static Member

a member of a class that isn’t associated with an instance of a class. Instead, the member belongs to the class itself. As a result, you can access the static member without first creating a class instance.

37
New cards

Static

keyword in Java is mainly used for memory management. The static keyword in Java is used to share the same variable or method of a given class. The users can apply static keywords with variables, methods, blocks, and nested classes.

38
New cards

variable scope

The different scopes of a variable in Java are:

  • Instance, or object, scope

  • Class, or static, scope

  • Method scope

  • Block scope

Instance scope means that the variable is attached to individual objects created from the class. When an instance-scoped variable is modified, it has no effect on other, distinct objects of the same class.

39
New cards

Array

An array is a contiguous block of memory storing a group of sequentially stored elements of the same type. Arrays in Java are of a fixed size and cannot be resized after declaration.