Core Java and J2EE Concepts Quiz
0 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Study Notes

CORE JAVA

  • String Comparison:

    • Comparing string literals (s1 and s2) results in true.
    • Comparing a literal with a newly created string (s1 and s3) returns true for equality but false for object reference equality.
  • Loop Output:

    • The code iterates through numbers from 1-9.
    • It skips multiples of 2.
    • It breaks when y equals 8.
    • The output is 1357.
  • Class Hierarchy Output:

    • In a class hierarchy, properties are inherited, but overridden members take precedence.
    • The output of obj.a is 10 when obj refers to an A object.
    • Because of inheritance, the obj variable is actually a reference to class B object even though the variable name is obj. The output from A is printed

J2EE

  • J2EE Components:

    • Servlets, JSPs, and Enterprise JavaBeans (EJBs) are components of J2EE architecture.
    • AWT (Abstract Window Toolkit) is not part of J2EE.
  • EJB Functionality:

    • EJBs support distributed transactions.
    • They are used for enterprise-level functionality.
  • JNDI Role:

    • JNDI (Java Naming and Directory Interface) provides an API for directory service lookup and data retrieval based on names.
  • Deployment Descriptor:

    • The web.xml deployment descriptor configures web application deployment, defining servlets and URL mappings.

Hibernate

  • Immutability Mapping:

    • Use the @Immutable annotation to map immutable entities in Hibernate.
  • Fetch Mode:

    • @Fetch(FetchMode.SUBSELECT) fetches associated collections using a subselect query in one database roundtrip to boost efficiency.
  • Second-Level Cache:

    • The second-level cache in Hibernate is visible to all sessions and is not specific to a single session.
  • Optimistic Locking:

    • The @version annotation is used for optimistic locking in Hibernate. It marks the field for version checking to prevent conflicts if multiple developers try to edit the same database records

Spring

  • Component Scanning:

    • The @Component annotation is used to define a Spring component, enabling automatic detection and registration by Spring.
  • Dependency Injection:

    • @Autowired automatically injects dependencies by type.
  • Spring Boot:

    • Spring Boot uses a CLI for development, testing, and packaging, reducing boilerplate code.
  • Transactions:

    • @Transactional marks a method for transaction management.
  • Custom Scopes:

    • Use the @Scope annotation for customized bean scopes.

Web Services

  • WSDL (Web Services Description Language):

    • WSDL describes web service methods, including parameters and return types. This description is used in service discovery and communication.
  • HTTP Methods (REST):

    • PUT is an idempotent HTTP method usually used for resource updates in RESTful web services.
  • UDDI:

    • UDDI (Universal Description, Discovery, and Integration) acts as a registry for businesses and their web services, enabling clients to discover web services based on names.
  • HATEOAS:

    • HATEOAS (Hypermedia As The Engine Of Application State) is a critical concept in RESTful web services, where the next steps are hyperlinked in returned documents. The client learns which actions are possible and how to make those actions by examining the links.
  • WS-Security:

    • WS-Security is not used to encrypt data at rest.

Java Web Design

  • JavaScript Output:

    • Javascript code outputing NaN as the result of summing a function.
  • 3D Transformation: -The transform property is used in CSS3 to apply various 3D transformations to an element.

  • HTML5 Options Grouping: -The optgroup element in HTML5 is used to group options together in a drop-down list for better organization

  • Sticky Positioning: -The position: sticky attribute in CSS3 positions an element relative to its normal position but makes it fixed at a specific offset to the viewport as the user scrolls.

React

  • Component Re-rendering:

    • React.memo prevents re-rendering of a component if its props haven't changed.
  • Use Callback:

    • The output from the snippet is 2 because of the React.useCallback hook, which memoises the callback.
  • Context API:

    • Context API in React can be used to pass values without prop drilling if the desired props are needed deeper down in the component tree

AWS

  • Docker Containers:

    • Amazon ECS (Elastic Container Service) is used for running Docker containers in AWS.
  • AWS Lambda:

    • Lambda runs code without provisioning or managing servers, typically used for serverless functions.
  • CloudFormation:

    • AWS CloudFormation automates resource management; provisioning, and configuration changes by treating resources as code.
  • DynamoDB:

    • Amazon DynamoDB is a NoSQL database service in the cloud.
  • CI/CD:

    • AWS CodePipeline is a CI/CD service to automate changes (integration, testing, and deployment) to software.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Java MCQ PDF

Description

Test your knowledge on Core Java string comparisons, loop outputs, and class hierarchy, along with J2EE components like Servlets and EJBs. This quiz will challenge your understanding of object-oriented programming and enterprise architecture in Java.

More Like This

Core Java Quiz
5 questions

Core Java Quiz

AttentiveMossAgate avatar
AttentiveMossAgate
Core Java Syntax and Features Quiz
5 questions
Core Java Fundamentals Quiz
12 questions
Core JAVA Unit 1
10 questions

Core JAVA Unit 1

CheerfulExuberance7373 avatar
CheerfulExuberance7373
Use Quizgecko on...
Browser
Browser