Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
/*
* Created on 10.01.2005@19:10:25
*
* TODO Licence info
*/
package de.tutorials;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* @author Administrator
*
* TODO Explain me...
*/
public class LinkedListExample {
public static void main(String[] args) {
new LinkedListExample().doIt();
}
/**
*
*/
private void doIt() {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
ListNode node = null, current = null;
try {
while (!(line = br.readLine()).equals(" ")) {
Integer i = Integer.valueOf(line);
node = new ListNode(i);
if (current != null) {
current.addNode(node);
}
current = node;
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while (current != null) {
System.out.println(current.data);
current = current.previous;
}
}
class ListNode {
protected ListNode previous;
protected ListNode next;
protected Object data;
public ListNode(Object data) {
this.data = data;
}
public void addNode(ListNode other) {
if (other == null)
throw new IllegalArgumentException("other must be not null!");
other.previous = this;
this.next = other;
}
}
}