Java EE Flashcards
Study Java
What is the difference between Java SE and Java EE?
SE = Standard Edition. EE = Enterprise edition; providing more tools for scalable enterprise-level applications. Enterprise Java Bean (EJB), JavaServer Pages (JSP), and Java Persistence API (JPA) can be found in Java EE.
What is an Application Server?
F`ramework that provides the necessary infrastructure and runtime environment for hosting, deploying, and executing Java-based enterprise applications.
What are Key Features of an application server?
Servlet Container
Enterprise JavaBeans (EJB) Container
JPA Provider
Connection Pooling
Security Services
Transaction Management
Clustering and Load Balancing
What is a Servlet Container in the Context of Java?
It provides the runtime environment for deploying and executing Java servlets and JavaServer Pages (JSP). Servlet containers handle incoming HTTP requests, manage the lifecycle of servlets, and generate HTTP responses.
What is a Enterprise JavaBeans (EJB) Container in the Context of Java?
It manages the lifecycle, concurrency, and transactions of Enterprise JavaBeans (EJBs), which are server-side components used for implementing business logic in Java EE applications.
What is a JPA Provider in the Context of Java?
Many application servers include a Java Persistence API (JPA) provider, which facilitates object-relational mapping (ORM) and database interaction in Java EE applications.
What is Connection Pooling in the Context of Java?
Application servers often provide connection pooling mechanisms to efficiently manage and reuse database connections, improving performance and scalability.
What is a Security Services in the Context of Java?
Application servers offer security features such as authentication, authorization, and encryption to protect sensitive data and resources within enterprise applications.
What is a Transaction Management in the Context of Java?
They support distributed transaction management, allowing multiple resources (such as databases and message queues) to participate in a single transaction, ensuring data integrity and consistency.
What is a Clustering and Load Balancing in the Context of Java?
Application servers often include features for clustering and load balancing to distribute incoming requests across multiple server instances, improving scalability and fault tolerance.
What is the difference between Global & Local variables in Java?
Global Variables:
Instance Scope. Known as instance variables because each instance of the object has its own copy of the instance variable.
Local Variables:
Method Scope. Only accessible within the scope in which they are declared (A method, code block, or constructer).
What are Java Applets?
Java applets were a feature of the Java programming language that allowed developers to embed Java programs (applets) into web pages. Better GUIs and platform independence as long as the browser ran Java. Deprecated in Java 9.
What is JavaFX?
Replaced applets. JavaFX is a modern, rich client platform for building desktop and mobile applications. New GUI Stack and developed from Swing & Abstract Window Tool Kit (AWT).
What are Literals and what are identifiers? Can you see them here: System.out.println(“Hello” + 1 + 2.5);
Identifier:
An identifier in Java is a name given to a programming element such as a variable, method, class, interface, or package. NOT Reserved Keywords (void, class, public, static)
ex. System.out.println
Literal:
A literal in Java refers to a fixed value that is written directly in the source code of a program. (Hard coded and immutable)
ex. “Hello”, 1, 2.5
What is a lexicon, lexical unit, syntax, semantics, and Tokens?
Lexicon - character set
Syntax - Defines Tokens
Semantics - Defines if it is syntactically correct
Lexical unit - character out of the lexicon
Token - Lexical Unit recognized by compiler