OCJP Practice Papers – Date/Time API

OCJP Practice Papers –Date/Time API include following topics

  • Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime,Instant, Period, and Duration
  • Work with dates and times across timezones and manage changes resulting from daylight savings including Format date and times values
  • Define and create and manage date-based and
read the rest

OCJP Practice Papers – Exceptions and Assertions

OCJP Practice Papers –Java Stream API include following topics

  • Use try-catch and throw statements
  • Use catch, multi-catch, and finally clauses
  • Use Autoclose resources with a try-with-resources statement
  • Create custom exceptions and Auto-closeable resource
  • Test invariants by using assertions

See the complete syllabus for OCJP here

 

1. If a try, a catch, and a finally statement are used together but read the rest

OCJP Practice Papers – Java Stream API

OCJP Practice Papers –Java Stream API include following topics

  • Develop code to extract data from an object using peek() and map() methods including primitive versions of the map() method
  • Search for data by using search methods of the Stream classes including findFirst, findAny, anyMatch, allMatch, noneMatch
  • Develop code that uses the Optional class
  • Develop code that uses Stream data methods
read the rest

OCJP Practice Papers – Lambda Built-in Functional Interfaces

OCJP Practice Papers –Using Loop Constructs include following topics

  • Create and use a generic class
  • Create and use ArrayList, TreeSet, TreeMap, and ArrayDeque objects
  • Use java.util.Comparator and java.lang.Comparable interfaces
  • Collections Streams and Filters
  • Iterate using forEach methods of Streams and List
  • Describe Stream interface and Stream pipeline
  • Filter a collection by using lambda expressions
  • Use method references with Streams

See … read the rest

OCJP Practice Papers – Generics and Collections

OCJP Practice Papers –Using Loop Constructs include following topics

  • Create and use a generic class
  • Create and use ArrayList, TreeSet, TreeMap, and ArrayDeque objects
  • Use java.util.Comparator and java.lang.Comparable interfaces
  • Collections Streams and Filters
  • Iterate using forEach methods of Streams and List
  • Describe Stream interface and Stream pipeline
  • Filter a collection by using lambda expressions
  • Use method references with Streams

See … read the rest

OCJP Practice Papers-A– Advanced Java Class Design

OCJP Practice Papers –Advanced Java Class Design include following topics

  • Develop code that uses abstract classes and methods
  • Develop code that uses the final keyword
  • Create inner classes including static inner class, local class, nested class, and anonymous inner class
  • Use enumerated types including methods, and constructors in an enum type
  • Develop code that declares, implements and/or extends interfaces and
read the rest

OCJP Practice Papers – Java Class Design

OCJP Practice Papers – Java Class Design include following topics

  • Implement encapsulation
  • Implement inheritance including visibility modifiers and composition
  • Implement polymorphism
  • Override hashCode, equals, and toString methods from Object class
  • Create and use singleton classes and immutable classes
  • Develop code that uses static keyword on initialize blocks, variables, methods, and classes

See the complete syllabus for OCJP here

Sample Questions

read the rest

OCJP Practice Papers – Operators and Decision Constructs

OCJP Practice Papers – Operators and Decision Constructs covers following topic under this section

  • Using Operators and Decision Constructs
  • Use Java operators; use parentheses to override operator precedence
  • Test equality between Strings and other objects using == and equals()
  • Create if and if/else and ternary constructs
  • Use a switch statement

1.Which of the following variable types is not permitted in read the rest