Results 1 to 3 of 3
  1. #1
    VincenzoGuzzi is offline Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default C++ to Java [Help Needed!]

    Hey everyone does anybody know how this c++ code-

    This is not Java code D: ?
    Java Code:
    cout << "This is my variable %i .", myClass.getVariable();
    works in Java? It doesen't seem to work the same and I don't know what the name of ^this is in c++ so I can't
    really Google it so I came here.

    Any help appreciated, thanks!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: C++ to Java [Help Needed!]

    Java doesn't work this way as we don't have an equivalent operator. Consider looking into using the System.out.printf(...) method.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: C++ to Java [Help Needed!]

    Moved from Forum Guides

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Help needed with java
    By ozzy in forum New To Java
    Replies: 11
    Last Post: 11-01-2009, 10:08 PM
  2. java help needed
    By mayhewj7 in forum New To Java
    Replies: 1
    Last Post: 01-28-2009, 05:33 AM
  3. Help needed in Java
    By javanewbie in forum New To Java
    Replies: 2
    Last Post: 07-08-2008, 07:55 PM
  4. Java experts needed- 30 minute online Java projects
    By michelle in forum Jobs Offered
    Replies: 0
    Last Post: 03-05-2008, 11:47 PM
  5. Java help needed
    By jeneal in forum New To Java
    Replies: 0
    Last Post: 11-21-2007, 03:04 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
  •