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 class BitOperators | |
{ | |
public static void main(String[] args) | |
{ | |
// Bit operators are available only for integer types (byte, short, int, | |
// long) | |
// Uncomment the line below and you'll get compile time error | |
// System.out.println(25f >> 3); | |
/**************************** Bit Wise Operators ******************************/ |
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
/** | |
* <p> | |
* This class contains examples that help to understand the <code>char</code> | |
* type together with the <strong>Unicode encoding scheme</strong>. The explanations | |
* and examples are based on "The char Type" and "Code Points and Code Units" chapters | |
* of "Core Java" book (Volume 1, 8th edition) by Cay Horstmann and Gary Cornell. | |
* </p> | |
* <p> | |
* Before proceeding to examples, read the following terminology: | |
* </p> |
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
package com.examples; | |
import java.util.ArrayList; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.ListIterator; | |
/** | |
* This is utility class that contains an example of how to reverse elements in | |
* the list. You shouldn't actually implement your own reverse utility - use |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.LinkedHashSet; | |
import java.util.List; |
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
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
/** | |
* Binary tree, post-order traversal | |
* | |
* @author Ivan Palianytsia | |
* | |
*/ |