User Profile

Collapse

Profile Sidebar

Collapse
chetah
chetah
Last Activity: Feb 27 '11, 08:51 AM
Joined: Sep 28 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • chetah
    started a topic Recursion on a linkedlist
    in Java

    Recursion on a linkedlist

    Code:
    import java.io.*;
    import java.util.*;
    
    class LinkedList<T extends Comparable <T>>
    {
    	private Node head;
    	private Node last;
    	private T data;
    
    	public LinkedList()
    	{
    		head = null;
    	}
    
    	public boolean isEmpty()
    	{
    		return (head==null);
    	}
    
    
    	public void addToHead (T val)
    	{
    ...
    See more | Go to post

  • chetah
    replied to Recursion on a LinkedList
    in Java
    Call from main

    Thanks you very much for your response. However, I still have a problem, when I am call a function from the main program.

    public static void main(etc){

    ST.addToTail(No de x, 12) // I am unable to access the Node class from LinkedList.
    where am I going wrong?
    See more | Go to post

    Leave a comment:


  • chetah
    started a topic Recursion on a LinkedList
    in Java

    Recursion on a LinkedList

    Code:
    public class LinkedList<T>{
        private Node head;
        
        
        public LinkedList()
        {
            head = null;
        }
        
        public boolean isEmpty()
        {
            return (head==null);
        }
        
        public void addToHead(T val )
        {
            Node n = new Node(val);
            n.next = head;
            head   =
    ...
    See more | Go to post

  • chetah
    started a topic returning an array of structures in c
    in C

    returning an array of structures in c

    Code:
    #include <stdio.h>
    
    struct pencil{
    int hardness;
    char maker;
    int number;
    };
    
    
    
    struct pencil add(struct pencil pen);
    
    int main(void){
    int i;
    
    struct pencil pen;
     struct pencil p[3];
     
    
    p=add(&pen);
     
    
    
    
    for (i = 0; i < 3; ++i){
    	printf("\n%d   %c%  d%",
    ...
    See more | Go to post

  • chetah
    started a topic Sql/oracle format

    Sql/oracle format

    I am using a table called Employees. I want to display:
    Smith 7898
    John 7856

    What should I do to get the above format?
    See more | Go to post

  • chetah
    started a topic Java:noSuchElementException.
    in Java

    Java:noSuchElementException.

    text file
    Dietel10004 How to Program In Java R IN Dietal & Dietal Prentice Hall 06-09-08
    Flanag0204 Java In a Nutshell C OUT David Flanagan O'Reilly 03-06-20
    END
    99100452 John Smith #5 Hillview Drive, Tunapuna UnderGrad 5
    02154632 Chris Chami #16 Insame Lane, St. Anns Lecturer 0
    END

    Data are separated by tabs


    [code=java]
    public class Book{
    private...
    See more | Go to post
    Last edited by Nepomuk; Oct 8 '08, 11:31 PM. Reason: Added [CODE] tags

  • chetah
    replied to Java:Reading text file
    in Java
    bd.txt
    D2333 How to program in Java r IN 454554 Dietal & Dietal Prentice Hall
    G4547 Java in a Nut Shell c 343345 David Flagman O'Reilly 03-02-08
    END

    678764 John Smith #5 Hill View, Rose Hall Undergrad 5
    END

    Thank you very much, the tab works fine. The above is an example of the data I am working with. Having gotten the tab to work, reading in the data...
    See more | Go to post
    Last edited by Nepomuk; Oct 7 '08, 02:04 PM. Reason: Added [CODE] tags

    Leave a comment:


  • chetah
    replied to Java:Reading text file
    in Java
    bd.txt
    D2333 How to program in Java r IN 454554 Dietal & Dietal Prentice Hall
    G4547 Java in a Nut Shell c 343345 David Flagman O'Reilly 03-02-08
    END

    678764 John Smith #5 Hill View, Rose Hall Undergrad 5
    657933
    END
    See more | Go to post

    Leave a comment:


  • chetah
    started a topic Java:Reading text file
    in Java

    Java:Reading text file

    bd.txt
    D2333 How to program in Java r IN 454554 Dietal & Dietal Prentice Hall
    G4547 Java in a Nut Shell c 343345 David Flagman O'Reilly 03-02-08
    END

    678764 John Smith #5 Hill View, Rose Hall Undergrad 5
    END

    //end of sample data
    1. data elements are separated by Tabs
    problems
    1. When I try to read the text file as is give an error....
    See more | Go to post
    Last edited by r035198x; Oct 6 '08, 07:12 AM. Reason: added code tags

  • chetah
    started a topic Setting up a home network

    Setting up a home network

    Can you show me using a diagram how I can set up a home network spaced within a radius of say 30 feet that can be configured for file sharing and internet access. What secuirity measures can I consider?
    See more | Go to post
No activity results to display
Show More
Working...