Browse Source

system file changes

master
David 2 years ago
parent
commit
1dd6705d0f
2 changed files with 20 additions and 0 deletions
  1. +6
    -0
      .idea/vcs.xml
  2. +14
    -0
      src/HUE_06_Generics.java

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 14
- 0
src/HUE_06_Generics.java View File

@@ -1,5 +1,19 @@
import java.util.Queue;

public class HUE_06_Generics {
public static void main(String[] args) {
Queue<String> strs = new ChainQueue<String>();
strs.add("hallo1");
strs.add("hallo2");
strs.add("hallo3");
System.out.println("Contains: " + strs.contains("hallo1"));
System.out.println("Contains: " + strs.contains("hallo4"));
System.out.println(" - " + strs.poll() + " #" + strs.size());
System.out.println("Contains: " + strs.contains("hallo1"));
System.out.println("Contains: " + strs.contains("hallo4"));
System.out.println(" - " + strs.poll() + " #" + strs.size());
System.out.println(" - " + strs.poll() + " #" + strs.size());
System.out.println(" - " + strs.poll() + " #" + strs.size());

}
}

Loading…
Cancel
Save