網頁

2012年10月8日 星期一

Java 中的 LinkedList

練習線性串列,加入字串"where", "are", "you", "going", "?"

 

58 則留言:


  1. import java.util.*;
    public class B9833035 {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  2. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList<String> list=new LinkedList<String>();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  3. package p1;
    import java.util.*;
    public class hw1
    {


    public static void main(String[] args)
    {
    String pu []={"where","are","you","going","?"};
    LinkedList<String> list=new LinkedList<String>();
    for(String x:pu)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  4. B10033045 林仲仁2012年10月8日 上午11:27

    import java.util.*;
    public class B10033045 {


    public static void main(String[] args) {
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x:arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  5. import java.util.*;
    public class hello{
    public static void main (String[]args){
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  6. import java.util.*;
    public class hello{
    public static void main (String[]args){
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  7. import java.util.*;
    public class abc{
    public static void main(String args[]){
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  8. import java.util.*;
    public class shao{
    public static void main(String args[]){
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  9. import java.util.*;
    public class hello {
    public static void main(String[] args) {
    String arr []={"?","going","you","are","Where"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  10. import java.util.*;
    public class test {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  11. import java.util.*;
    public class hello {
    public static void main(String[]args){
    String arr[]={"Where","are","you","going","?"};
    LinkedList<String> list = new LinkedList<String>();
    for(String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  12. import java.util.*;
    public class hello {
    public static void main(String [] args){
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list = new LinkedList<String>();
    for (String x:arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  13. import java.util.*;
    public class hello {
    public static void main(String[]args){
    String arr[] ={"Where","are","you","going","?"};
    LinkedList<String> list = new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  14. B10033004 羅時侒2012年10月8日 上午11:38

    import java.util.*;
    public class H4{
    public static void main (String[] args){
    String arr[]={"where","are","you","going","?"};
    LinkedList list= new LinkedList();
    for(String x :arr)
    list.addFirst(x);
    System.out.println (list);

    }
    }

    回覆刪除
  15. B10033004 羅時侒2012年10月8日 上午11:38

    import java.util.*;
    public class H4{
    public static void main (String[] args){
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list= new LinkedList<String>();
    for(String x :arr)
    list.addFirst(x);
    System.out.println (list);

    }
    }

    回覆刪除
  16. import java.util.*;
    public class b10033044 {

    public static void main(String[] args) {
    String arr []={"Where","are","you","doing","?"};
    LinkedList<String> list=new LinkedList<String> ();
    for (String x : arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  17. import java.util.*;
    public class b10033057 {

    public static void main(String[] args) {
    String arr []={"Where","are","you","doing","?"};
    LinkedList<String> list=new LinkedList<String> ();
    for (String x : arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  18. import java.util.*;
    public class hello {
    public static void main(String[] args) {
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  19. import java.util.*;
    public class qwop {
    public static void main(String[] args){
    String arr[]={"where","are","you","going"};
    LinkedList list = new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  20. import java.util.*;
    public class sayhollow {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","where"};
    sayhollow list= new sayhollow();
    for (String X :arr)
    list.addFirst(x);
    System.out.println(list);
    int x=list.indexof("Taiwan");
    if (x!=-1)
    list.add(x,"real?");
    System.out.println(list);
    list.remove();
    System.out.println(list);
    Object brr[]=list.toArray();
    for (Object y: brr)
    System.out.println(y);
    }
    }

    回覆刪除
  21. import java.util.*;
    public class testLinkedList {
    public static void main(String[] args) {
    String arr[]={"JAVA","API","好用"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    int x=list.indexOf("JAVA");
    if (x!=-1)
    list.add(x,"誰說的");
    System.out.println(list);
    list.remove();
    System.out.println(list);
    Object brr[]=list.toArray();
    for (Object y: brr)
    System.out.println(y);
    }
    }

    回覆刪除
  22. import java.util.*;
    public class LinkedList {
    public static void main(String[]args) {
    String arr[]={"JAVA","API","好用"};
    LinkedList<String> list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    int x=list.indexOf("JAVA");
    if (x!=-1)
    list.add(x,"誰說的");
    System.out.println(list);
    list.remove();
    System.out.println(list);
    Object brr[]=list.toArray();
    for (Object y: brr)
    System.out.println(y);
    }
    }

    回覆刪除
  23. import java.util.*;
    public class test {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","Where"};
    LinkedList<String>list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    回覆刪除
  24. import java.util.*;
    public class hello {
    public static void main(String [] args){
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list = new LinkedList<String>();
    for (String x:arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  25. import java.util.*;
    public class test {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","Where"};
    LinkedList<String>list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    回覆刪除
  26. import java.util.*;
    public class test {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","Where"};
    LinkedList<String>list=new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    回覆刪除
  27. B10033007 蕭雅文2012年10月8日 上午11:53

    import java.util.*;
    public class abc {
    public static void main (String[] args){
    String arr[]={"where","are","you","ging","?"};
    LinkedListlist= new LinkedList();
    for (String X :arr)
    list.addFirst(X);
    System.out.println(list);

    }
    }

    回覆刪除
  28. B10033034 陳冠錚2012年10月8日 上午11:53

    import java.util.*;
    public class abc {
    public static void main (String[] args){
    String arr[]={"where","are","you","ging","?"};
    LinkedListlist= new LinkedList();
    for (String X :arr)
    list.addFirst(X);
    System.out.println(list);

    }
    }

    回覆刪除
  29. import java.util.*;
    public class B9733002鍾志捷 {
    public static void main(String[] args) {
    String arr []={"?","going","you","are","Where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  30. import java.util.*;
    public class hello{
    public static void main (String[]args){
    String arr[]={"where","are","you","going","?"};
    LinkedList list= new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  31. mport java.util.*;
    public class hello {
    public static void main(String[]args){
    String arr[] ={"Where","are","you","going","?"};
    LinkedList list = new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  32. import java.util.*;
    public class abc{
    public static void main(String args[]){
    String arr[]={"?","going","you","are","where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  33. package XD;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList<String> list=new LinkedList<String>();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  34. import java.util.*;
    public class asd {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String arr[]={"?","going","you","are","where"};
    LinkedList list= new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  35. import java.util.*;
    public class zxc {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String arr[]={"?","going","you","are","where"};
    LinkedList list= new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  36. import java.util.*;
    public class b9833151
    {
    public static void main(String[] args)
    {
    String arr []={"Where","are","you","doing","?"};
    LinkedList list=new LinkedList ();
    for (String x : arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  37. import java.util.*;
    public class NYPD{
    public static void main(String args[]){
    String arr[]={"where","are","you","going","?"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  38. import java.util.*;
    public class jas{
    public static void main (String[]args){
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  39. import java.util.*;
    public class B10033020{
    public static void main (String[]args){
    String arr[]={"where","are","you","going","?"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  40. import java.util.*;
    public class qwop {
    public static void main(String[] args){
    String arr[]={"where","are","you","going"};
    LinkedList list = new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }


    回覆刪除
  41. b10033017 鄭人豪2012年10月29日 上午9:20

    package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList<String> list=new LinkedList<String>();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  42. import java.util.*;
    public class H4{
    public static void main (String[] args){
    String arr[]={"where","are","you","going","?"};
    LinkedList list= new LinkedList();
    for(String x :arr)
    list.addFirst(x);
    System.out.println (list);

    }
    }

    回覆刪除
  43. mport java.util.*;
    public class qwop {
    public static void main(String[] args){
    String arr[]={"where","are","you","going"};
    LinkedList list = new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  44. import java.util.*;
    public class a{
    public static void main(String args[]){
    String arr[]={"?","going","you","are","where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  45. import java.util.*;
    public class test {
    public static void main(String[] args) {
    String arr[]={"?","going","you","are","where"};
    LinkedList<String> list= new LinkedList<String>();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  46. package p1;
    import java.util.*;
    public class asd
    {


    public static void main(String[] args)
    {
    String pu []={"where","are","you","going","?"};
    LinkedList list=new LinkedList();
    for(String x:pu)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  47. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  48. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  49. import java.util.*;
    public class abc{
    public static void main(String args[]){
    String arr[]={"?","going","you","are","where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  50. import java.util.*;
    public class hello {
    public static void main(String[] args) {
    String arr []={"?","going","you","are","Where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  51. import java.util.*;
    public class good {


    public static void main(String[] args) {
    String arr[]={"?","going","you","are","where"};
    LinkedList list=new LinkedList();
    for (String x:arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  52. import java.util.*;
    public class B9833035 {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String arr[]={"?","going","you","are","where"};
    LinkedList list= new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);
    }

    }

    回覆刪除
  53. mport java.util.*;
    public class hello {
    public static void main(String[] args) {
    String arr []={"?","going","you","are","Where"};
    LinkedList list=new LinkedList();
    for (String x :arr)
    list.addFirst(x);
    System.out.println(list);

    }

    }

    回覆刪除
  54. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  55. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  56. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  57. package p1;
    import java.util.*;
    public class hw1
    {


    public static void main(String[] args)
    {
    String pu []={"where","are","you","going","?"};
    LinkedList list=new LinkedList();
    for(String x:pu)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除
  58. package p1;
    import java.util.*;
    public class hw1
    {
    public static void main(String[] args)
    {
    String a[]={"where","are","you","doing","?"};
    LinkedList list=new LinkedList();
    for(String x:a)
    list.addFirst(x);
    System.out.println(list);
    }
    }

    回覆刪除

HTML 編輯器