Java Vocabulary

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

&&

"and" operator; when both sides of && evaluate to true, true is returned; if one or both sides of && evaluate to false, false is returned. Example: (5=5 && 2=2) is true; (5=5 && 2=3) is false; (5=9 && 9=10) is also false.

!

"not" operator; inverts the value of a boolean. Example: !(5=5) is false; !(5=5 && 2=2) is false; !((5=9 || 9=10) is true

||

"or" operator; when both sides of || evaluate to false, false is returned; if one or both sides of || evaluate to true; true is returned. Example: (5=5 || 2=2) is true; (5=5 || 2=3) is true; (5=9 || 9=10) is false.

Properties

(also known as attributes): The types of information objects hold.

Assignment Operator

= is the symbol that assigns a value to a variable.

Boolean

A Java data type that holds one of two values - either true or false.

Class Declartation

A blueprint explaining how each object of that class will behave, like a function declaration - it defines which properties the object will hold.

Class

A classification for an object, for example, you could have a class called Puppy and a particular object of that class could be a Chocolate Lab named Bruiser. And another object could be a Chihuahua named Todd. They're

Assertation Library

A collection of tools (known as a library) included as part of JUnit that are used to "assert" (or, "confirm") that code is returning the values we expect it to.

REPL

A command line tool that allows the user to enter lines of code and see the result in the terminal when executed; stands for Read-Evaluate-Print-Loop.

Client

A computer program that sends a request to another program for data or services (e.g., a web browser is a client that sends requests to a web server).

Data Structure

A general programming term for grouping together and organizing pieces of information. An Array, for example, is a data structure.

Spark

A lightweight web application framework, which will allow us to create web sites using Java. We need it in order to be able to output something to a web page that can be viewed in a browser.

Symbol

A line of code that represents something else. When we create variables or methods, their names are symbols.

Command Line Interface

A more specific type of user interface. The portion of the application users interact with in the command line. All our programs so far contain command line interfaces. We provide them input, or view their output exclusively through the command line.

Variable

A named storage unit for a value; assigned by setting a name, a data type and an initial value; for example, the variable, res0 is a string data type set to an initial value of "Hello World":

Hypertext Transfer Protocol (HTTP)

A protocol that defines how requests are formatted, transmitted and processed between web clients and web servers.

Stack Trace

A report detailing what caused an error, and where it occurred. They're often very long and a little intimidating; but the most useful information is usually at the top!

Post

A request method that acts upon the resource by adding, updating or deleting information on the server. Example: submitting a form to join a mailing list which adds your name to the list.

Get

A request method that retrieves information from the server but does not change anything on the server. Example: request to see a homepage for a site.

Substrings

A segment within a string.

String

A sequence of characters between quotation marks.

Array

A sequenced collection of data designated with square brackets [ ] (but we use curly braces {} when we originally define it!)

Method

A set of code instructions that do actions when called on an object of a class; similar to functions in other programming languages.

Internet Protocol (IP) Address

A set of numbers separated by periods that uniquely identifies a device on the Internet.

Bytecode

A special type of machine code meant to run on the Java Virtual Machine. You don't need to know how to write this type of code, the compiler built into our JRE will translate our easily-readable source code into bytecode for us.

Formatted String

A string containing a format specifier (see below) to concatenate additional values into it using the .format() method.

Package

A technique for organizing similar types of Java code. Including code built-in to the Java language. When we want to use functionality from a Java package, we can import it by including something like this: import java.util.ArrayList;. In this instance, java.util is the package, and ArrayList is a specific class within that package.

Integer

A type of data that represents whole numbers (without decimals).

Object

A unique instance of a class; a data representation of some thing that has properties and methods associated.

Instance

A unique object that represents an example of a class. "Epicodus" is an instance of the String class.

Member Variables

A variable that belongs (ie: "is a member of") a specific class. Refers to the attributes/properties we declare in our classes. In Java they're prefixed with an m in order for easy identification by other developers.

Package

A way to organize large amounts of code. There are user-defined packages, that the developer creates themselves, and there are built-in packages that are already included in Java. When we need a package, we can import it like this: import java.io.Console. Here, java.io is the package, and Console is the specific class we're importing.

For Each Loop

Allows us to cycle through an array, and pinpoint each item individually.

DRY

An acronym for "Don't Repeat Yourself" meaning code should not be repetitive. If you find redundancies in your code, you'll want to DRY it up by rewriting it more efficiently.

Gradle Task

An action that we tell Gradle to complete for us. Some tasks are built in, like this one, which instructs Gradle to compile our source code for us. For larger, more complex projects it's also possible to define your own custom gradle tasks in the build.gradle file.

Value Declaration

An expression where a variable is initialized with a name, data type and value.

Gradle

An open source build automation tool that assists in managing project's dependencies. You provide it a list of dependencies you need, and Gradle locates, downloads, and installs them into your project.

Relational Operator

An operator that compares two values in relation to each other. The result of the evaluated relation will be true or false.

Equality Operator

An operator that compares two values to determine if they are or are not equal; the result will be a boolean value of either true or false.

Arithmetic Operator

An operator used in the manipulation of numeric data types.

Fragment

An optional part of a URL that contains details for where the browser should display the information (e.g. on a particular div).

Query String

An optional part of a URL that contains parameters for querying a database; begins with the ? symbol; often used in a search request

Dependency

An outside tool or library an application depends upon in order to function correctly

Chaining Methods

Applying more than one method in a sequence.

Wrapper Classes

Classes that correspond to the different types of primitives. These classes wrap the primitive into a proper object. For instance, Integer is the wrapper class for int. and Boolean is the wrapper class for boolean.

Concatenation

Creating a new string by combining multiple existing strings with the + operator. For example, "Java" + " rocks!"; becomes "Java rocks!".

HTTP Request Body

Data that needs to be transmitted to the server in the HTTP request message (like data from a submitted form).

Status Code

First line of the response message from the server consisting of a three-digit number indicating the status of the request. Example: 200 indicates that the request was successfully processed.

Java Virtual Machine (JVM)

Included as part of our Java Runtime Environment, this is what actually runs our code after it is compiled into bytecode.

Import

Including specific parts of Java source code in a program to avoid loading all source code.

Objects

Instances of classes that store information. What type of information depends on the class declaration.

Generic

Introduced in 2004 as part of JDK 5.0 in order to allow the Java compiler to catch and alert us of more errors while compiling code, before we ever run our programs. Generic types tell Java what kind of object a data structure can hold.

Encapulation

Keeping all the data manipulation localized inside of the object. For instance, making all class properties private, and only accessing them via a method defined in that same class.

Compiled Language

Languages like Java, whose source code must be explicitly compiled into machine code before it can run.

Interpreted Language

Languages like JavaScript, where the developer can run the source code directly.

Annotation

Marked with an @ symbol. Most commonly they are used to tell the Java compiler something about a method it is about to run. In this case, it is telling the compiler that this is a test that should be run by JUnit.

Object Type

Objects in Java inherit functionality from a built-in Object class. Anything that is an object can be considered "Object type".

Port Number

Part of the addressing information used to identify the sender/receiver of requests at an IP address (e.g., 43 is the port number with this IP address: 198.185.159.145:43).

Arguments

Pieces of data a method may use in addition to the thing it is called on. They provide more information to methods to help them know what they're specifically supposed to do.

Plugins

Prebuilt Gradle extensions that give us access to more options while using Gradle.

Java Runtime Environment (JRE)

Required to run Java applications; the JRE provides the necessary tools for executing a Java application, including the Java Virtual Machine (JVM).

Domain Naming System (DNS) Servers

The "address book" of the Internet; servers that maintain all domain names and translate them to Internet Protocol (IP) addresses.

Java Development Kit (JDK)

The "package" of everything we need to start developing in Java, including the compiler required to translate our source code into bytecode. We already downloaded this directly from Oracle at the very beginning of this curriculum.

Instantiation

The act of creating a new object. This new object is a new instance of its class.

Compile

The act of translating Java code written by a developer into machine-code in order for the program to be executed.

Class

The blueprint for an object; every object is an instance of a class.

Source Code

The code we write in our .java files. More readable for human eyes than machine code.

Payload

The data that was requested in the original request message that is not protocol. Example: the payload for a request for the main page of a website would be the actual HTML document content.

Access Level Modifier

The declaration of public, private or protected in front of a property or method of a class. Determines who may access a particular element in a class.

HTTP Request Header

The first lines of an HTTP request message that include information about the client, server and the request.

Lower camelCase

The format used to write variable names in Java beginning with a lowercase letter, using no spaces or symbols between words and capitalizing all words after the first. For example, thisVariableIsInLowerCamelCase or finalCost or userFavoriteColor.

Root Path

The homepage of a web application that can be visited at localhost:4567.

Status Reason

The human language interpretation of the status code, not read by the client but intended for humans.

HTTP Method

The kind of action that the client is requesting to be done in the web server, also known as a verb. Most frequently used HTTP methods: GET and POST.

Data Type

The kind of data we can store in a variable; for example, string or integer are two of Java's data types.

Pirimitive

The most basic 'building block' of programming. Primitives are even simpler than objects. There are only eight, but for now we're only covering int, boolean and float.

Return Value

The object that is returned after the method is run. It is the response that is displayed in the REPL after a method is called on an object.

Host

The part of the URL that contains the domain name.

Path

The part of the URL that contains the resource name.

Scheme

The part of the URL that indicates the protocol to be used in communication (e.g. http://).

Branching

The point in the execution of a program where a condition will determine which code will be executed next. For example, an if statement would cause two or more branches in a program - depending on whether the statement evaluates totrue or false.

User Interface

The portion of an application the user sees and interacts with.

Index

The sequence location of an element in an array. The first element of an array has an index of 0.

Format Specifier

The symbol used in a formatted string. Such as %s to represent other strings, %f to represent floats, or %d to represent integers.

Web Resource

The target of a web address; Examples of web resources include files, documents, images, videos, stylesheets, scripts.

Parameter

The value of an argument; for example, when we run the method whatYouAteFor("lunch"), we are sending the parameter of "lunch" to the method that is called.

Return Value

The value returned after an expression is evaluated.

Uniform Resource Identifier (URI)/Uniform Resource Locator (URL)

The web address which specifies the location of the requested web resources.

Dot Operator

Used to access methods and variables within objects and classes. For instance, hatchback.mYear looks for a property called mYear located in an object stored in the variable hatchback.

Machine Code

Usually indecipherable to humans, this is code that can be executed and understood directly by a computer's CPU (such as binary).

System In

When data flows into the system; For example when information is retrieved from a user's input.

System Out

When data flows out from the system; For example, in System.out.prntln("Hello");, the string, "Hello" is printed out to the console.

Server Web Server

_____________ or ______________ _____________ A computer program or device that uses HTTP to distribute information to a client.

Setters Getters

________________ and ________________ are methods which either get or set the values of an object's properties, and can include some error checking to make sure it is done correctly.

Business Logic

aka Back-End Logic: Same as in Intro to Programming; the "behind the scenes" logic that makes our program work. The portion the user doesn't see. Like our Vehicle class in Vehicle.java.

Modulo

an arithmetic operator represented with the % symbol. Used to return the remainder when the first number is divided by the second. (ie: 8 % 4 would return 0, because 8 is evenly divided by 4. But 7 % 3 would return 1, because 3 fits into 7 evenly twice, to make 6, with a remainder of 1).

mavenCentral()

is a giant public repository that contains both dependencies we will be using today. We can view the contents of mavenCentral at [The Central Repository}(http://search.maven.org/) website.

Constructors

method that runs to create a new instance of a class. It constructs a new object, if you will. Any information regarding the initial setup of a new object can be included in a constructor.

Operator

special symbol used to perform an operation on one or more values.


Set pelajaran terkait

Penal Code 3 - TCOLE Objectives 8.24 - 8.34

View Set

Anatomy Chapter 5 The Skeletal System

View Set

Introduction to Concepts and Responsibilities of Home Ownership

View Set

Marketing Final (Ch 13 + All Quizzes)

View Set

ET3P4: Firms in a competitive market

View Set

Manufacturing Exam 1 Chapter 1-8

View Set

Chapter 9; Psychological Disorders

View Set

CSE205 - Exam 2 - Quiz 8 (Recursion)

View Set

Identify five strategies a classroom teacher can use to promote communicative skills and enhance independence in the transition to adulthood.

View Set

Chapter 02: Expanded Tax Formula, Form 1040, and Basic Concepts - Smartbook

View Set

PrepU: Chapter 48: Nursing Care of the Child With an Alteration in Metabolism/Endocrine Disorder

View Set