This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExemploComponentWillMount extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| shouldComponentUpdate(nextProps, nextState) { | |
| //alguma ação a ser tomada | |
| } | |
| //outros metodos ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExemploComponentWillMount extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| componentWillUpdate() { | |
| //executa alguma ação | |
| } | |
| //outros metodos ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExemploComponentWillMount extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| componentDidUpdate() { | |
| //executa alguma ação | |
| } | |
| //outros metodos ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExemploComponentWillReceiveProps extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| componentWillReceiveProps() { | |
| //executa alguma ação | |
| } | |
| //outros metodos ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExemploComponentWillUnmount extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| componentWillUnmount() { | |
| //executa alguma ação | |
| } | |
| //outros metodos ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| E2{ | |
| void addTwo( int value ){ | |
| System.out.println(value); | |
| value += 2; | |
| System.out.println(value); | |
| } | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| E3 { | |
| int number; | |
| public E3 (int number){ | |
| this.number = number; | |
| } | |
| int getNumber(){ | |
| return this.number; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class E1 { | |
| public static void main( String[] args){ | |
| // tenta realiza a atribuição a um int com o retorno de um método void | |
| int i = new E1().metodoSemRetorno(); | |
| } | |
| public void metodoSemRetorno(){}; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public int getAge(People p) throws RuntimeException {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class E5 { | |
| public void main(String[] args){ | |
| } | |
| } |