Results 1 to 3 of 3
  1. #1
    Kuroyuki is offline Member
    Join Date
    May 2014
    Posts
    1
    Rep Power
    0

    Default the equivalent of these packages in java?

    does anyone know the equivalent of these packages in java from c++?

    #include <windows.h>
    #include <stdio.h>
    #include <iostream> // for cout and cin
    #include <time.h> // For seeding random
    using namespace std;
    #include <cstdlib> // for the system() function
    #include <fstream>
    #include <string>
    #include <sstream>

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    2

    Default Re: the equivalent of these packages in java?

    In my eyes you cannot compare header files to packages. The bahaviour is different.

    It is important what you want to do. But I would avoid porting code between c++ and java. Rewrite the code so you get a clean solution.

    Just take that windows.h stuff - you do not have access to the low level items in java. For graphical gui applications you can have to use a java "framework" like awt or swing.

    Konrad

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,017
    Blog Entries
    7
    Rep Power
    23

    Default Re: the equivalent of these packages in java?

    There isn't a one to one correspondence between C++ header files and Java packages; there isn't even an equivalence relation between the two. Why should Java behave as another language, just people claim to 'know' (mind the quotes) that other language?

    kind regards,

    Jos
    I have the stamina of a seal; I lie on the beach instead of running on it.

Similar Threads

  1. java (7) equivalent of .Net timespan
    By .paul. in forum New To Java
    Replies: 12
    Last Post: 07-29-2012, 04:38 PM
  2. Replies: 1
    Last Post: 07-14-2011, 01:14 AM
  3. Equivalent of PHP isset in JAVA
    By africanhacker in forum New To Java
    Replies: 11
    Last Post: 03-24-2011, 03:41 PM
  4. Java equivalent of PHP's variable-variables?
    By XmisterIS in forum New To Java
    Replies: 7
    Last Post: 09-01-2010, 11:05 AM
  5. Php explode function, equivalent java
    By fernando in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2007, 05:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •