Objetivos_SCJP

download Objetivos_SCJP

of 7

Transcript of Objetivos_SCJP

  • 8/12/2019 Objetivos_SCJP

    1/7

  • 8/12/2019 Objetivos_SCJP

    2/7

    Section : !lo" #ontrol

    Develop code that implements an ifor switchstatement+ and identify legal argument

    types for these statements.

    Develop code that implements all forms of loops and iterators, including the use of

    for, the enhanced for loop (for!each), do, while, labels, break, and continue+ and

    explain the values taen by loop counter variables during and after loop execution. Develop code that maes use of assertions, and distinguish appropriate from

    inappropriate uses of assertions.

    Develop code that maes use of exceptions and exception handling clauses (try,

    catch,finally), and declares methods and overriding methods that thro exceptions.

    -ecognize the effect of an exception arising at a specified point in a code fragment.

    ote that the exception may be a runtime exception, a checed exception, or an

    error.

    -ecognize situations that ill result in any of the folloing being thron/

    ArrayIndexOutOfBoundsException, ClassCastException,

    IllegalArgumentException,IllegalStateException,NullointerException,

    Number!ormatException,AssertionError,ExceptionInInitiali"erError,StackO#erflowErrororNoClass$ef!oundError. 0nderstand hich of these are

    thron by the virtual machine and recognize situations in hich others should be

    thron programmatically.

    Seo : !l$xo de #ontrole

    Desenvolver c"digo #ue implementa uma senten$a ifou switche identificar os

    argumentos v&lidos para essas senten$as.

    Desenvolver c"digo #ue implementa todas as formas de loopse iterators, incluindo

    o uso dofor, loop avan$ado (for-each), do, while, r"tulos, breake continuee

    explanar os valores #ue s*o considerados nas vari&veis controladoras do loopdurante e depois da execu$*o do loop.

    Desenvolver c"digo #ue faz uso do assertione distingue o uso apropriado e

    inapropriado das asser$%es.

    Desenvolver c"digo #ue faz uso de exce$%es e clausulas de manipula$*o de

    exce$%es (try, catch,finally), declarar mtodos e sobrepor mtodos #ue lan$am

    exce$%es.

    -econhecer o efeito de um lan$amento de uma exce$*o em um ponto espec1fico em

    um fragmento de c"digo. otar #ue a exce$*o pode ser uma exce$*o do tipo

    runtime, uma exce$*o verificada ou um erro.

    -econhecer situa$%es #ue ir*o resultar no lan$amento de uma das seguintes

    exce$%es/ArrayIndexOutOfBoundsException, ClassCastException,IllegalArgumentException,IllegalStateException,NullointerException,

    Number!ormatException,AssertionError,ExceptionInInitiali"erError,

    StackO#erflowErrorouNoClass$ef!oundError. 2ntender #uais dessas exce$%es

    s*o lan$adas pela muina virtual e #uais outras devem ser lan$adas

    programaticamente.

  • 8/12/2019 Objetivos_SCJP

    3/7

    Section %: &'I #ontents

    Develop code that uses the primitive rapper classes (such asBoolean, Character,

    $ouble,Integer, etc.), and3or autoboxing 4 unboxing. Discuss the differences

    beteen theString,StringBuilder, andStringBufferclasses.

    Given a scenario involving navigating file systems, reading from files, riting to

    files, or interacting ith the user, develop the correct solution using the folloingclasses (sometimes in combination), from%a#a&io/Buffered'eader,

    Buffered(riter, !ile, !ile'eader, !ile(riter,rint(riter, and Console.

    0se standard 5672 A89s in the%a#a&textpacage to correctly format or parse dates,

    numbers, and currency values for a specific locale+ and, given a scenario, determine

    the appropriate methods to use if you ant to use the default locale or a specific

    locale. Describe the purpose and use of the%a#a&util&)ocaleclass.

    :rite code that uses standard 5672 A89s in the%a#a&utiland%a#a&util&regex

    pacages to format or parse strings or streams. ;or strings, rite code that uses the

    atternand*atcherclasses and theString&splitmethod. -ecognize and use regular

    expression patterns for matching (limited to/&(dot), +(star), ,(plus), -, .d, .s, .w,

    /0, 12). he use of +, ,, and -ill be limited to greedy #uantifiers, and theparenthesis operator ill only be used as a grouping mechanism, not for capturing

    content during matching. ;or streams, rite code using the !ormatterandScanner

    classes and therint(riter&format3printfmethods. -ecognize and use formatting

    parameters (limited to/ 4b, 4c, 4d, 4f,4s) in format strings.

    Seo %: #onte(do da &'I

    Desenvolver c"digo #ue usa as classes wrappersprimitivas (tais comoBoolean,

    Character,$ouble,Integer, etc.) incluindo autoboxinge unboxing. Discutir as

    diferen$as entre as classesString,StringBuildereStringBuffer.

    Dado um cen&rio envolvendo navega$*o em um sistema de ar#uivos, leitura dear#uivos, grava$*o de ar#uivos ou intera$*o com o usu&rio, desenvolver a solu$*o

    correta usando as seguintes classes ( precisar usar a regi*o padr*o

    ou uma determinada regi*o. Descrever a finalidade e uso da classe%a#a&util&)ocale.

    2screver c"digo #ue usa a A89 5672 padr*o dos pacotes%a#a&utile%a#a&util&regex

    para formatar ou analisarstringestreams. 8arastring, escrever c"digo #ue usa as

    classesatterne*atchere o mtodoString&split. -econhecer e usar as express%esregulares para reconhecimento (limitado a/&(ponto), +(asterisco), ,(adi$*o), -

    (interroga$*o), .d, .s, .w,/0(colchetes) e 12(parenteses)). ? uso de +, ,e -ser&

    limitado ao #uantificador guloso e o operador par>nteses ser& somente usado como

    mecanismo de agrupamento, n*o para captura de conte=do durante a an&lise. 8ara

    streams, escrever c"digo usando as classes !ormattereScannere os mtodos

    formateprintfda classerint(riter. -econhecer e usar par'metros de formata$*o

    (limitado a/ 4b, 4c, 4d, 4f, 4s) nostringde formata$*o.

  • 8/12/2019 Objetivos_SCJP

    4/7

    Section ): #onc$rrenc*

    :rite code to define, instantiate, and start ne threads using both java.lang.hread

    and java.lang.-unnable.

    -ecognize the states in hich a thread can exist, and identify ays in hich a thread

    can transition from one state to another.

    Given a scenario, rite code that maes appropriate use of object locing to protectstatic or instance variables from concurrent access problems.

    Seo ): #oncorr+ncia

    2screver c"digo para definir, instanciar e iniciar novas threadsusando tanto

    %a#a&lang&5hreadcomo%a#a&lang&'unnable.

    -econhecer os estados em #ue uma threadpode estar e identificar caminhos nos

    #uais uma threadpode transitar de um para outro estado.

    Dado um cen&rio, escrever c"digo #ue faz o uso apropriado de travamentode

    objetos para proteger vari&veis est&ticas ou de inst'ncia de problemas de acesso

    concorrente.

  • 8/12/2019 Objetivos_SCJP

    5/7

    Section : OO #oncepts

    Develop code that implements tight encapsulation, loose coupling, and high

    cohesion in classes, and describe the benefits.

    Given a scenario, develop code that demonstrates the use of polymorphism. ;urther,

    determine hen casting ill be necessary and recognize compiler vs. runtime errors

    related to object reference casting. 2xplain the effect of modifiers on inheritance ith respect to constructors, instance

    or static variables, and instance or static methods.

    Given a scenario, develop code that declares and3or invoes overridden or

    overloaded methods and code that declares and3or invoes superclass, or overloaded

    constructors.

    Develop code that implements @is!a@ and3or @has!a@ relationships.

    Seo : #onceitos de Orientao a Objetos -OO.

    Desenvolver c"digo #ue implementa encapsulamento fechado, baixo acoplamento e

    alta coes*o nas classes e descrever os seus benef1cios+

    Dado um cen&rio, desenvolver c"digo #ue demonstra o uso de polimorfismo.

    Adicionalmente determinar #uando o castingser& necess&rio e reconhecer erros de

    compilador versus erro de execu$*o relativos ao castingde objetos referenciados.

    2xplicar o efeito dos modificadores sobre a heran$a com respeito aos construtores,

    vari&veis est&ticas ou de inst'ncia e mtodos est&ticos ou de inst'ncia.

    Dado um cen&rio, desenvolver c"digo #ue declara e3ou chama mtodos sobrescritos

    ou sobrecarregados e o c"digo #ue declara e3ou chama construtores da superclasse

    ou sobrecarregados.

    Desenvolver c"digo #ue implementa relacionamento !umB e3ou tem!umB.

  • 8/12/2019 Objetivos_SCJP

    6/7

    Section /: #ollections 0 enerics

    Given a design scenario, determine hich collection classes and3or interfaces should

    be used to properly implement that design, including the use of the Comparable

    interface.

    Distinguish beteen correct and incorrect overrides of corresponding hashCodeand

    e6ualsmethods, and explain the difference beteen 77and the e6ualsmethod. :rite code that uses the generic versions of the Collections A89, in particular, the

    Set,)ist, and*apinterfaces and implementation classes. -ecognize the limitations

    of the non!generic Collections A89 and ho to refactor code to use the generic

    versions. :rite code that uses theNa#igableSetandNa#igable*apinterfaces.

    Develop code that maes proper use of type parameters in class3interface

    declarations, instance variables, method arguments, and return types+ and rite

    generic methods or methods that mae use of ildcard types and understand the

    similarities and differences beteen these to approaches.

    0se capabilities in the%a#a&utilpacage to rite code to manipulate a list by sorting,

    performing a binary search, or converting the list to an array. 0se capabilities in the

    %a#a&utilpacage to rite code to manipulate an array by sorting, performing abinary search, or converting the array to a list. 0se the%a#a&util&Comparatorand

    %a#a&lang&Comparableinterfaces to affect the sorting of lists and arrays.

    ;urthermore, recognize the effect of the @natural ordering@ of primitive rapper

    classes and%a#a&lang&Stringon sorting.

    Seco /: #olees 0 en2ricos

    Dado um cen&rio de desenho, determinar #ual classes de cole$*o e3ou interfaces

    devem ser usadas ade#uadamente para corretamente implementar o desenho,

    incluindo o uso da interface Comparable.

    Distinguir entre sobreposi$*o correta e incorreta dos mtodos correspondentshashCodee e6ualse explicar a diferen$a entre 77e o mtodo e6uals.

    2screver c"digo #ue usa a vers*o genrica da A89 de Cole$%es, em particular, as

    interfacesSet,)iste*ape suas classes de implementa$*o. -econhecer as

    limita$%es da A89 n*o!genrica de Cole$%es e como modificar o c"digo para usar a

    vers*o genrica. 2screver c"digo #ue usa as interfacesNa#igableSete

    Na#igable*ap.

    Desenvolver c"digo #ue faz o uso ade#uado par'metros de tipo nas declara$%es de

    classes3interfaces, vari&veis de inst'ncia, argumentos de mtodos e tipo de retorno.

    2screver mtodos genricos ou mtodos #ue fazem uso de tipos curingas e entender

    as similaridades e diferen$as entre essas duas abordagens.

    0sar as capacidades no pacote%a#a&utilpara escrever c"digo para manipular umalista pela classifica$*o, realizar pes#uisa bin&ria ou converter uma lista em um

    array. 0sar as capacidades no pacote%a#a&utilpara escrever c"digo para manipular

    um arraypela classifica$*o, realizar pes#uisa bin&ria ou converter arrayem uma

    lista. 0sar as interfaces%a#a&util&Comparatore%a#a&util&Comparablepara

    modificar a classifica$*o de listas e arrays. Alm disso, reconhecer o efeito da

    ordena$*o naturalB das classes wrappersprimitivas e%a#a&lan&Stringna

    classifica$*o.

  • 8/12/2019 Objetivos_SCJP

    7/7

    Section 3: !$ndamentals

    Given a code example and a scenario, rite code that uses the appropriate access

    modifiers, pacage declarations, and import statements to interact ith (through

    access or inheritance) the code in the example.

    Given an example of a class and a command!line, determine the expected runtime

    behavior. Determine the effect upon object references and primitive values hen they are

    passed into methods that perform assignments or other modifying operations on the

    parameters.

    Given a code example, recognize the point at hich an object becomes eligible for

    garbage collection, determine hat is and is not guaranteed by the garbage

    collection system, and recognize the behaviors of the Ob%ect&finali"e12method.

    Given the fully!#ualified name of a class that is deployed inside and3or outside a

    5A- file, construct the appropriate directory structure for that class. Given a code

    example and a classpath, determine hether the classpath ill allo the code to

    compile successfully.

    :rite code that correctly applies the appropriate operators including assignmentoperators (limited to/ , E, !), arithmetic operators (limited to/ E, !, F, 3, , EE,

    !!), relational operators (limited to/ H, H, I, I, , J), the instanceof operator,

    logical operators (limited to/ 4, K, L, J, 44, KK), and the conditional operator ( M / ), to

    produce a desired result. :rite code that determines the e#uality of to objects or

    to primitives.

    Seo 3: !$ndamentos

    Dado um exemplo de c"digo e um cen&rio, escrever c"digo #ue usa os

    modificadores de acesso apropriados, declara$%es de pacotes e senten$as import

    para interagir com o c"digo no exemplo (atravs de acesso ou heran$a). Dado um exemplo de uma classe e um comando de linha, determinar o

    comportamento esperado na execu$*o.

    Determinar o efeito sobre refer>ncias de objetos e valores primitivos #uando eles

    s*o passados para mtodos #ue realizam assinalamentos ou outras opera$%es de

    modifica$*o sobre os par'metros.

    Dados um c"digo exemplo, reconhecer o ponto em #ue os objetos se tornam

    eleg1veis para a coleta de lixo, determinar o #ue e o #ue n*o garantido pelo

    sistema de coleta de lixo do sistema e reconhecer esse comportamento no mtodo

    Ob%ect&finali"e1 2.

    Dado o nome totalmente #ualificado de uma classe #ue distribu1da dentro e3ou

    fora de um ar#uivo 5A-, construir a estrutura de diret"rio apropriada para essaclasse. Dado um c"digo exemplo e um classpath, determinar se o classpathir&

    permitir #ue o c"digo seja compilado com sucesso.

    2screver c"digo #ue corretamente aplica os operadores de assinalamento

    apropriados (limitado a/ 7, ,7e 87), operadores aritmticos (limitados a/ ,, 8,3, 4,

    ,,e 8 8), operadores relacionais (limitado a/ 9, 97, :, :7, 77, ;7), operador

    instanceof, operadores l"gicos (limitados a/ , ;,