It is in C possible but Great Java !

Hi
The following statement runs successfully in c but not in Java.
main()
int a=20;
int b=20;
a+b // not to  store any variable
Class java
Void method()
Int a=10;
Int b=20;
     a+b // not to  store any variable
}Why java throw �not a statement � compile time error. But not c compiler ��yyyy

Why java throw �not a statement � compile time
error. But not c compiler ��yyyy
I am lazy to test your code either in java or in C. But I want to comment about your question. Java was defined to work in this way, the creators decided that Java will work in this way. Besides, think for a minute, your question is not interesting, I mean, if you were comparing features in Java and in C that are better in one than in other language, so your question would be interesting. But, in your case, what is the importance of a + b without using that in any point of your program, either in Java or in C? Thinking about your question is a waste of time, this is my opinion.

Similar Messages

  • I am programmer and I am using dr java on my mac-book pro with retina display but dr java doesn't support retina display, what is the possible way to solve this ?

    I am programmer and I am using dr java on my mac-book pro with retina display but dr java doesn't support retina display, what is the possible way to solve this ?

    I have made some progress.... I can print wirelessly from my printer now, but I can't set the printer itself to be wireless.  I had to move my printer downstairs to where my router is...which is not that convient.   I printed up the page you asked about....and as expected, it says it is off line and there is no IP address.    So now I need to figure out how to make my printer itself wireless.  I did download the HP driver I needed...but I can't access it to do anything else.  It seems l like I am missing a step... or I need to hook up my computer itself to the printer to help get the printer to be wirelss, but I can't hook it up because there is no port for me to do that (no port that looks like a phone jack).  I am guessing I would need a different type of cord, but I am not sure what kind of cord that would be! Ugh!

  • Possible to create java code on the fly?

    I'm just curious.
    I am in the process of making a bunch of custom Lightweight components which will be a part of a physics tutorial package. (Stuff like arrows, charges, fields, cars, rocks, etc.). I have some specific tutorial applets I am creating for a prof at my local u using these components.
    In the middle of this, I thought...
    Wouldn't it be GREAT if I could make an extremely simple "editor" which my prof could use directly to create his own applets? (I can certainly do the drag and drop, menus and stuff that would go along with this)
    Is it possible to write a program in Java which writes and compiles Java, without too much fuss?
    Another words, it would be wonderful if my prof could:
    Click on the Charge Object
    Drag it to the Physics Container
    Click on the Physics Container
    Turn on the Electric Field by changing the Container's properties
    Then hit Some Menu->Compile Applet
    and boom!! he'd have his applet exactly the way he wants it. (and the program would create the code for him to put on his website).
    Is it possible?
    :) Jen
    (P.S. please remember that my prof can't do Java, so even Java Beans in an IDE are out).

    Sure it's possible, but there are three things you need to consider here.
    1. Your IDE would support drag-and-drop as per your requirements. You'd have to learn that incase you haven't already done so.
    2. There's no point in writing your own Java compiler. You could after pouring through the specifications, but it's better just to generate the source file and compile it by running javac through your application.
    3. The source code generation. Depending on which part of your final applet code is fixed and which is variable this could be lot of work (the trickiest part being to decide what is fixed and what is variable.. in other words, the design).
    It sounds like fun alright, but you would get the same results by just putting all these features in the applet itself. Have the applet allow the user to choose amongst a host of features (the ones that you plan to put into your editor). I guess you'll have to make your final decision based on how much time you have.
    Have fun and best of luck.
    Arjun

  • Is it possible to call Java routines from FMS?

    Say I have a game package, most of which
    are written in Java. I am thinking
    to leave the core logics in Java, but
    change the user interface into Flash,
    and serve it over FMS. Now is it
    possible to call Java routines from
    FMS?
    I'd appreciate any suggestions.

    Yes! You can use SOAP(or XML-RPC) to call Java routines.
    Relevant link:
    http://www.adobe.com/devnet/flashmediaserver/articles/fms_web_services_05.html
    Btw, does anyone know if there is XML-RPC package for
    FMS?

  • Is there any possibility to develope java application for IPhones

    Is there any possibility to develope java application for IPhones

    921326 wrote:
    Just look to the next thread!I did that after I replied to the last person to ask this question. I spotted this thread:
    Developing iPhone apps with JavaFX 2 (Demo)
    Not much there, but apparently people are trying to hack it together using JavaFX 2 already. I believe I read an article where Oracle itself had given a presentation about a JavaFX2 app on an iPhone; I believe the gist of it is that they want to make it so you can bundle the Java runtime with your application, which makes it legal to sell a Java application through the appstore.

  • Is it possible to convert Java to EXE and run this EXE file without any JRE

    hello friends
    I have GCC/GCJ for windows but dont know how to work with it... it creates file with .o extension but i m not able to create .exe from that... i installed mingw for that also .. unsuccessful ...
    tell me the solution for it... i want to generate machine dependent exe from java file...on the web i ve seen that GCC/GCJ is used on linux platform..not cleared properly..
    Again i m writing my question
    Is it possible to convert Java to EXE and run this EXE file without any JRE if yes then how... tell me the procedure to do that...

    Vipul wrote:
    Its software now hardware .... some times u need these things ...anyway do u ve solution for my questionSo what? By creating a native executable you are restricting the program to the OS for which that native executable was made, just like removing the engine from a car restricts driving to downhill only. So like the I said, the principle remains the same, "Why would you want to?"
    I am asking you, truthfully, why do you feel the need to negate the largest advantage of using Java by creating a native executable from it?
    What is your rationale?
    I can pretty much guarantee there is a much better way of achieving your wish without "removing the engine".

  • OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF. then 2.  need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that

    OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF; then 2. I need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that??
    I had been saving as a PDF and then reducing the size of the PDF by printing it as a PDF with a degree of image compression. I write manuals with a LOT of screen captures and line art that needs to be clear. So it is a balancing act between image clarity and PDF size. The PDFs on the web need to be smaller - sure you can undertsand.
    Anyway, when I print the PDF again, I lose both my destinations and bookmarks.
    Anyone know of any way to avoid that?

    Control the images by creating a custom PDF Job Options and then selecting it in the PDF Job Options drop-down of the PDF setup dialog box (File > Save as PDF...)
    Create the custom PDF Job Options file with Distiller. If you do not have Distiller, open the Printing Preferences of the Adobe PDF printer. Start with the Smallest File Size Job Options settings and Edit.

  • Can I open .pmd files in indesign? And how? Since indesign is a "substitute" for PageMaker it should/must be possible, but I don't know how to do it

    Can I open .pmd files in indesign? And how? Since indesign is a "substitute" for PageMaker it should/must be possible, but I don't know how to do it

    CS6 was the last version capable of opening Pagemaker files. It's included with Cloud subscriptions, so if you don't have it installed (or an earlier version) you can download it from your cloud subscription.
    To open them you use File > Open..., but the quality of conversion can range between nearly perfect and total garbage, depending on the PM file and the status of links (unembed images before trying to convert).

  • My App Store doesn't work, it says there is no connection possible, but Safari and iTunes Store are working perfektly

    my app store doesn't work, it says there is no connetion possible but safari and the itunes store ars working perfectly, so whats wrong ???

    Hi..
    Installing the Mac OS X 10.6.8 Update Combo reinstalls the App Store for you. It's ok to do this even though you are already running v10.6.8
    Restart your Mac after the combo is installed. Then try the App Store.
    If that didn't help, if you have anti virus software installed, you need to disable that. And third party apps such as Little Snitch can prevent access to the App Store as well.

  • A possible *bug* in java jcombobox

    Hi all,
    I think i found a possible bug in java jcombobox .. i am sure some of you must have already experienced it..
    supposedly you put a jcombobox in a jpanel
    returned the panel from a method to a calling method..
    and that method adds it to another panel that it had created to a frame..
    and if this happens dynamicaly at runtime, as only after u click a button..
    meaning : without adding the combobox or the immediate parent panelto the contentpane .. directly..
    Then,
    your combox's keylistener may not catch events fired.
    .. this has happened to me many times.. and always i could only find a way out
    .. by adding the combobox to panel that is loaded during startup itself and is
    .. not returned through a method call.
    Your opinions please ?
    'Harish.

    All components in a UI are created at run-time.
    When you create your JFrame you call pack() to align and resize the UI. This validates all the components, and sets the default focus on what ever component should have the focus at start up.
    When you create components and add them as children of another component you have to validate the child and parent. This can be done by calling JComponent.validate()
    As for keylisteners not getting called, this might be fixed if you call grabFocus on the new combobox. I can't see a reason why any listener would stop working.
    For me to really understand what your talking about. I'd need to see source code reproducing this problem.

  • HT5648 Is it possible to use Java 1.6.0_39 on OS X 10.8.2

    Is it possible to use Java 1.6.0_39 on OS X 10.8.2

    Apple has posted (10/22/12) the approved solution for restoring the Java 6 plug-in:
    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality.

  • I know this is supposedly not possible, but I need to retrieve a specific voicemail from my iPhone which was also "cleared" from the Deleted Messages box. Any suggestions?

    I know this is supposedly not possible, but I need to retrieve a specific voicemail from my iPhone which was also "cleared" from the Deleted Messages box. Any suggestions?
    This is highly important. I know the number from which the voicemail arrived, but have not been able to figure out how to retrieve it. I accidentally had the voicemail in the Deleted Messages folder, and then Cleared this folder. If there is any possible way I might be able to retrieve this message, even if there is a cost associated with it, please help me.
    Thank you.

    I think you maybe able to restore from backup if that voicemail was included in the backup. http://support.apple.com/kb/HT1766

  • Without  PR  create a new PO is possible,but i want with out PR  create PO

    Dear sir
    without  PR  create a new PO is possible,but i want with out PR  create PO  is not Possible,that setting please provide

    Dear,
    Make PR entry mandatory for ME21N transaction.
    Check: PR mandatory in PO Creation ME21N and ME22N
    Regards,
    Syed Hussain.

  • Most of my iPhone 4 memory is taken up with "other" there is no reason for this. I have tried to clear as much history as possible but cannot reduce the size of this.

    Most of my iPhone 4 memory is taken up with "other" there is no reason for this. I have tried to clear as much history as possible but cannot reduce the size of this.

    Try
    Do a reset (Hold Sleep/Wake and Home buttons about 10 secs or more till Apple logo appears)

  • I very much want to work in Apple tell me this is possible but I live in Russia

    I very much want to work in Apple tell me this is possible but I live in Russia

    Baxti ~ Start here:
    http://www.apple.com/jobs/ru/

Maybe you are looking for

  • Using calendar overlays - iframe overlay not showing (calendar in view)

    Hello, I'm playing with calendar in Sharepoint 2013 and overlays. I'm in the main calendar view and I don't have the "calendar in view" iframe in the calendar view. I can see all overlays in the calendar but there is no iframe. The goal is to a legen

  • Animaiton of 2D graph

    Dear I would like to present my results according to various paramters with powerpoint. Would you please let me know how to capture the 2D graph (and parameter controls) or make the file with LV conveniently? Should I save the image frames and then m

  • DMS_KPRO_CONVERT

    We are trying to migrate documents into KPRO using DMS_KPRO_CONVERT. The documentation for the program states there are 2 possible ways to run the program 1-Complete migration or 2 Step-by-step migration.  When we execute the program - we do not see

  • HT1911 I set up an account and can't access it,. It doesn't recognise my password my email or my date of birth.

    I set up an account and can't access it,. It doesn't recognise my password my email or my date of birth. Help

  • Changing billing info country

    I've just moved from Australia to England and I have a new credit card so I want to change my billing address. However the only selections coming up are United States and Australia. Any idea how to do this or do I have to make a new Apple ID?