Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package testtask;
- import testtask.MyLinkedL;
- /**
- *
- * @author Ira
- */
- public class TestTask {
- /**
- * @param args the command line arguments
- */
- public static int converter(String str){
- int y = Integer.parseInt(str);
- return y;
- }
- public static void main(String[] args) {
- int[] array;
- array = new int[5];
- MyLinkedL newList = new MyLinkedL();
- for (int i = 0; i <= 4; i++)
- newList.Add(i);
- newList = newList.head;
- for (int i = 0; i<=4; i++)
- {
- array[i] = newList.value;
- newList = newList.nextNode;
- }
- for (int i = 0; i<=4; i++)
- System.out.print(array[i]);
- System.out.print("\n"+ converter("12345"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement