You are on page 1of 7

Exam Objectives

Section 1: Declarations, Initialization and Scoping Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and import statements (including static imports). Develop code that declares an interface. Develop code that implements or extends one or more interfaces. Develop code that declares an abstract class. Develop code that extends an abstract class. Develop code that declares, initializes, and uses primitives, arrays, enums, and objects as static, instance, and local variables. Also use legal identifiers for variable names. Given a code example, determine if a method is correctly overriding or overloading another method, and identify legal return values (including covariant returns), for the method. Given a set of classes and superclasses, develop constructors for one or more of the classes. Given a class declaration, determine if a default constructor ill be created, and if so, determine the behavior of that constructor. Given a nested or non!nested class listing, rite code to instantiate the class. Seo 1: Declaraes, Inicializaes e Escopo Desenvolver c"digo #ue declara classes (incluindo classes abstratas e todas as formas de classes aninhadas), interfaces e enumerados, incluindo o uso apropriado das senten$as import e paclage (incluindo importa$%es est&ticas). Desenvolver c"digo #ue declara uma interface. Desenvolver c"digo #ue implementa ou estende uma ou mais interfaces. Desenvolver c"digo #ue declara uma classe abstrata. Desenvolver c"digo #ue estende uma classe abstrata.. Desenvolver c"digo #ue declara, inicializa e usa tipos primitivos, arrays, enums e objetos como vari&veis est&ticas, de inst'ncia e locais. (amb)m cobre o uso de identificadores legais para nomes de vari&veis. Dado um c"digo exemplo, determinar se um m)todo est& corretamente sobrepondo ou sobrecarregando outro m)todo e identificar para o m)todo um valor de retorno correto (incluindo retornos co!variantes). Dado um conjunto de classes e superclasses, desenvolver construtores para um ou mais dessas classes. Dado uma declara$*o de classe, determinar se o construtor padr*o ser& criado e em caso de ser criado, determinar o comportamento desse construtor. Dado uma rela$*o de classes aninhadas e n*o!aninhadas, escrever c"digo para instanciar a classe.

Section : !lo" #ontrol Develop code that implements an if or switch statement+ 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 ta,en by loop counter variables during and after loop execution. Develop code that ma,es use of assertions, and distinguish appropriate from inappropriate uses of assertions. Develop code that ma,es 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 chec,ed exception, or an error. -ecognize situations that ill result in any of the follo ing being thro n/ ArrayIndexOutOfBoundsException, ClassCastException, IllegalArgumentException, IllegalStateException, Null ointerException, Number!ormatException, AssertionError, ExceptionInInitiali"erError, StackO#erflowError or NoClass$ef!oundError. 0nderstand hich of these are thro n by the virtual machine and recognize situations in hich others should be thro n programmatically. Seo : !l$xo de #ontrole Desenvolver c"digo #ue implementa uma senten$a if ou switch e identificar os argumentos v&lidos para essas senten$as. Desenvolver c"digo #ue implementa todas as formas de loops e iterators, incluindo o uso do for, loop avan$ado (for-each), do, while, r"tulos, break e continue e explanar os valores #ue s*o considerados nas vari&veis controladoras do loop durante e depois da execu$*o do loop. Desenvolver c"digo #ue faz uso do assertion e 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 m)todos e sobrepor m)todos #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, Null ointerException, Number!ormatException, AssertionError, ExceptionInInitiali"erError, StackO#erflowError ou NoClass$ef!oundError. 2ntender #uais dessas exce$%es s*o lan$adas pela m&#uina virtual e #uais outras devem ser lan$adas programaticamente.

Section %: &'I #ontents Develop code that uses the primitive rapper classes (such as Boolean, Character, $ouble, Integer, etc.), and3or autoboxing 4 unboxing. Discuss the differences bet een the String, StringBuilder, and StringBuffer classes. Given a scenario involving navigating file systems, reading from files, riting to files, or interacting ith the user, develop the correct solution using the follo ing classes (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&text pac,age 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&)ocale class. :rite code that uses standard 5672 A89s in the %a#a&util and %a#a&util&regex pac,ages to format or parse strings or streams. ;or strings, rite code that uses the attern and *atcher classes and the String&split method. -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 the parenthesis operator ill only be used as a grouping mechanism, not for capturing content during matching. ;or streams, rite code using the !ormatter and Scanner classes and the rint(riter&format3printf methods. -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 wrappers primitivas (tais como Boolean, Character, $ouble, Integer, etc.) incluindo autoboxing e unboxing. Discutir as diferen$as entre as classes String, StringBuilder e StringBuffer. Dado um cen&rio envolvendo navega$*o em um sistema de ar#uivos, leitura de ar#uivos, grava$*o de ar#uivos ou intera$*o com o usu&rio, desenvolver a solu$*o correta usando as seguintes classes (<s vezes combina$%es delas) do pacote %a#a&io/ Buffered'eader, Buffered(riter, !ile, !ile'eader, !ile(riter, rint(riter e Console. 0sar a A89 5672 padr*o no pacote %a#a&text para corretamente formatar ou analisar datas, n=meros e valores monet&rios para uma regi*o (locale) e, dado um cen&rio, determinar os m)todos apropriados para usar se voc> 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&util e %a#a&util&regex para formatar ou analisar string e streams. 8ara string, escrever c"digo #ue usa as classes attern e *atcher e o m)todo String&split. -econhecer e usar as express%es regulares 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 !ormatter e Scanner e os m)todos format e printf da classe rint(riter. -econhecer e usar par'metros de formata$*o (limitado a/ 4b, 4c, 4d, 4f, 4s) no string de formata$*o.

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 ma,es appropriate use of object loc,ing to protect static or instance variables from concurrent access problems. Seo ): #oncorr+ncia 2screver c"digo para definir, instanciar e iniciar novas threads usando tanto %a#a&lang&5hread como %a#a&lang&'unnable. -econhecer os estados em #ue uma thread pode estar e identificar caminhos nos #uais uma thread pode transitar de um para outro estado. Dado um cen&rio, escrever c"digo #ue faz o uso apropriado de travamento de objetos para proteger vari&veis est&ticas ou de inst'ncia de problemas de acesso concorrente.

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 invo,es overridden or overloaded methods and code that declares and3or invo,es 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 casting ser& necess&rio e reconhecer erros de compilador versus erro de execu$*o relativos ao casting de objetos referenciados. 2xplicar o efeito dos modificadores sobre a heran$a com respeito aos construtores, vari&veis est&ticas ou de inst'ncia e m)todos est&ticos ou de inst'ncia. Dado um cen&rio, desenvolver c"digo #ue declara e3ou chama m)todos sobrescritos ou sobrecarregados e o c"digo #ue declara e3ou chama construtores da superclasse ou sobrecarregados. Desenvolver c"digo #ue implementa relacionamento A)!umB e3ou Atem!umB.

Section /: #ollections 0 1enerics 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 bet een correct and incorrect overrides of corresponding hashCode and e6uals methods, and explain the difference bet een 77 and the e6uals method. :rite code that uses the generic versions of the Collections A89, in particular, the Set, )ist, and *ap interfaces 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 the Na#igableSet and Na#igable*ap interfaces. Develop code that ma,es proper use of type parameters in class3interface declarations, instance variables, method arguments, and return types+ and rite generic methods or methods that ma,e use of ildcard types and understand the similarities and differences bet een these t o approaches. 0se capabilities in the %a#a&util pac,age 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&util pac,age to rite code to manipulate an array by sorting, performing a binary search, or converting the array to a list. 0se the %a#a&util&Comparator and %a#a&lang&Comparable interfaces to affect the sorting of lists and arrays. ;urthermore, recognize the effect of the @natural ordering@ of primitive rapper classes and %a#a&lang&String on sorting. Seco /: #olees 0 1en2ricos 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 m)todos correspondents hashCode e e6uals e explicar a diferen$a entre 77 e o m)todo e6uals. 2screver c"digo #ue usa a vers*o gen)rica da A89 de Cole$%es, em particular, as interfaces Set, )ist e *ap e suas classes de implementa$*o. -econhecer as limita$%es da A89 n*o!gen)rica de Cole$%es e como modificar o c"digo para usar a vers*o gen)rica. 2screver c"digo #ue usa as interfaces Na#igableSet e 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 m)todos e tipo de retorno. 2screver m)todos gen)ricos ou m)todos #ue fazem uso de tipos curingas e entender as similaridades e diferen$as entre essas duas abordagens. 0sar as capacidades no pacote %a#a&util para escrever c"digo para manipular uma lista pela classifica$*o, realizar pes#uisa bin&ria ou converter uma lista em um array. 0sar as capacidades no pacote %a#a&util para escrever c"digo para manipular um array pela classifica$*o, realizar pes#uisa bin&ria ou converter array em uma lista. 0sar as interfaces %a#a&util&Comparator e %a#a&util&Comparable para modificar a classifica$*o de listas e arrays. Al)m disso, reconhecer o efeito da Aordena$*o naturalB das classes wrappers primitivas e %a#a&lan&String na classifica$*o.

Section 3: !$ndamentals Given a code example and a scenario, rite code that uses the appropriate access modifiers, pac,age 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"e12 method. 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 assignment operators (limited to/ D, ED, !D), arithmetic operators (limited to/ E, !, F, 3, G, EE, !!), relational operators (limited to/ H, HD, I, ID, DD, JD), 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 t o objects or t o 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 (atrav)s 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 m)todos #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 m)todo 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 essa classe. Dado um c"digo exemplo e um classpath, determinar se o classpath ir& permitir #ue o c"digo seja compilado com sucesso. 2screver c"digo #ue corretamente aplica os operadores de assinalamento apropriados (limitado a/ 7, ,7 e 87), operadores aritm)ticos (limitados a/ ,, 8, 3, 4, ,, e 8 8), operadores relacionais (limitado a/ 9, 97, :, :7, 77, ;7), operador instanceof, operadores l"gicos (limitados a/ <, =, >, ;, <<, ==) e operador condicional ( - ? ) para produzir um resultado desejado. 2screver c"digo #ue determina a igualdade entre dois objetos ou dois tipos primitivos.

You might also like