Java features

Hello,
I would to know if this extract, written in 2004, is still topical with the current version of Java.
Delegates and indexers
The Java language doesn't have a construct directly equivalent to a C# delegate. You can mimic delegate functionality by declaring and implementing an interface with a single method definition.
The Java language doesn't have indexers either; you'd need to write them as regular class methods.
Operator overloading
The Java language doesn't allow operator overloading (a feature of C++ that made its way into C#). You easily can write methods to mimic the behavior of the overloaded operators.
Unsafe mode
C#'s unsafe mode lets you use pointers and pin blocks of memory in order to circumvent garbage collection. The Java runtime itself makes extensive use of pointers, but the Java language has no pointers and no equivalent of unsafe mode. This is in keeping with the Java platform's "Write Once, Run Anywhere" philosophy, which lets you safely avoid platform dependencies, memory leaks, and "runaway" code.Thank you in advance for any feedback.
Regards,
mathmax
Edited by: mathmax on Sep 30, 2008 9:09 PM

These points are still correct for [Java SE 6|http://java.sun.com/javase/6/].

Similar Messages

  • Oracle Database 2003 Beta Program: Java features

    We are currently recruiting for the Oracle Database 2003 Beta Program, including new Java in the database features. To learn more about this program, including how to apply, send e an email @ [email protected]
    Kuassi Mensah

    Hi, I intend to enroll for the Oracle BI 10G course, and need to study and see what are the eligibility criteria for it?
    Would appreciate if you can get back directly on my email [email protected]
    Intending to enroll and study for this . Thanks for your help
    Abhishek

  • Publish java feature?

    TOAD has a "Publish Java to PL/SQL" feature that automatically generates the PL/SQL wrapper code for Java Stored Procedures. Does SQL*Developer have any functionality like this? If not, are there plans to include it in the future?

    No, but you can request it at the announced SQL Developer Exchange.
    Regards,
    K.

  • Why would the Java Plugin not work in Firefox 5 on Mac SnowLeopard? I have the most recent version but am unable to use any Java features on Firefox 5. Firefox 3.6 works with the same Java but 5 will not.

    Most recent version of Java and firefox. Java Applications will start to load but end up in an infinite loading loop.

    Well, it's what I did to get my Java working in Firefox 4. I installed both binaries into my Library/Internet Plug-ins folder. The version was newer that what was previously installed (newer version is 0.9.7.5). It solved the Java problems I was having. My inital problem was that Java would not initiate and no applets would run in Firefox version 4 which I just installed a few days ago.
    I know the readme.txt. says it is not compatible with version 4, but the release date on 0.9.7.5 is after the release date of Firefox 4 and so that was I tried it. I figure there was nothing to lose as at worst it woud update my two plug-in files. Nothing was going to be changed otherwise. If you try it, it might work.

  • Xmlclassgen for java feature requests

    1) automatically generate code to populate
    these classes from xml input (preferably using SAX parser)
    2) open up the sources so that folks like
    myself can add functionality like (1) or at
    lease document private and protected functions so that I can derive from these classes.
    3) runtime access to DTD info.
    4) easy way to map between tags and java class names
    5) ability to add a java package to generated code (I see an option for this, but so far
    it hasn't worked at all for me).
    6) programatic access to id->node map (there must be one, since validation claims to check this.)
    7) introduce intermediate node-group classes
    so that methods to access children, and be
    number and type specific.
    8) Xpath navigation tools (query a tree of generated class nodes using Xpath syntax)
    null

    5) ability to add a java package to generated code (I see an option for this,
    but so far it hasn't worked at all for me).
    We already have this functionality. And Here is the example for DTD class Generator:import java.util.Vector;
    Vector m_packageName = new Vector();
    m_packageName.addElement("testpackage");
    // set Java Package Name
    generator.setJavaPackage(m_packageName);
    XML Schema Generator will create package for each namespace, we also support that.null

  • JAVA Feature

    As all we know, that java create its own platform which over its underlaying h/w , s/w . That's why java offers the nature of plateform indpendency. Due to which unlike any other language like c or c++ datatype and its storage size never depends upon underlaying syatem arch. My question is this since java creates such a protection for plateform independecy then what is the use of keyword "strictfp" which takes special care of floating point calculation ?

    strictfp is a Java keyword used to restrict floating-point calculations to ensure portability. The modifier was introduced into the Java programming language with the Java virtual machine version 1.2.
    In older JVMs, floating-point calculations were always strict floating-point, meaning all values used during floating-point calculations are made in the IEEE-standard float or double sizes. This could sometimes result in a numeric overflow or underflow in the middle of a calculation, even if the end result would be a valid number. Since version 1.2 of the JVM, floating-point calculations do not require that all numbers used in computations are themselves limited to the standard float or double precision.
    However, for some applications, a programmer might require every platform to have precisely the same floating-point behavior, even if some platforms could handle more precision. In that case, the programmer can use the modifier strictfp to ensure that calculations are performed as in the earlier versions?only with floats and doubles.
    The modifier can be used in combination with classes, interfaces and methods.
    this was taken from wikpedia hopefully that explains it to you. (i don't know if you are using a translator or not, but please proof read your posts, it took me awhile to figure what you meant.)
    (java creates it's own platform? Think about it, java provides portabilty how? (think peers))
    cheers
    octaclot
    Edited by: Octaclot on Oct 25, 2007 4:15 AM

  • Basic Java Concepts

    I'm a Java novice, trying to learn it along with Jdeveloper side by side. My learning of the Java fundamental concepts led to the below understanding, please see if my understanding is not correct in any way.
    The fundamental concept with Java is a CLASS, whose feature are its state and behaviour. The state of the class is stored in the definition of the class itself via ATTRIBUTES or in lay man's language VARIABLES. These attributes can be static, public, private or protectd.
    The behaviour of a class is stored via METHODS within the definition of a class. METHOD is nothing but a block of code performaing a certain action.
    A good example of a CLASS's state a behaviour can be a stock. A stocks state is available via its ticker symbol, price of the stock, and the date i.e. on a given date, a given stock has a particular price. So there are 3 attributes.
    Now METHOD in the context of the above example is a means to capture the ever changing state of the above 3 attributes.
    In short attributes or fields ( defined via declaration of variables inside the class) capture the state of an object, where as its interaction with the world external to the object captured by METHOD.
    These 3 attributes are common to thousands of stock's in the outside market, so a common class called STOCK can be created to capture the state and behaviour of thousands of stocks. The same class can be called at the same time to capture the behaviour of N number of stocks. When a class is called as explained, each such call is called an INSTANCE of the CLASS. An OBJECT is an instance of SUCH a class.
    Similar to CLASS is INTERFACE. A given class can only call the attributes and methods from one another class. If a class needs to inherit from more than one another class then it is accomplished via an INTERFACE. An Interface contains only the spec of the methods from other classes and not the entire piece of code for he method itself. The methods that are declared in the interface are implemented in the classes to which they belong to.
    A PACKAGE in turn is a collected of CLASSES and INTERFACES. A PACKAGE helps in keeping the code oraganized and grouped by the functionaliy it delivers.
    A Class can in turn be either a SUPERCLASS or a SUBCLASS. In our given example CLASS, there are some stocks which offer OPTIONS and some which do not. In order to cover that behaviours we will like to create sub class called STOCSKWITHOPTIONS, which will then refer to STOCK class to inherit the attributes and methods from that class. In this case STOCK is the SUPERCLASS, and STOCKOPTIONS is the SUBCLASS.
    Thanks in advance

    Nagarjuna,
    there is an excellent tutorial series from Sun for basic and advanced Java features. It contains a lot of examples and explains every concept. You even download the tutorials.
    See http://java.sun.com/javase/reference/tutorials.jsp
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Installing Java add-in on ABAP Stack

    Hello Gurus,
    We have recently upgrade from SAP R/3 4.7 ext. 20 SR2 to ECC 6.0 SR3 on Solaris platform using Oracle 10g. We are on Non-unicode system and on Single Stack i.e. AS ABAP only.
    Now as new requirement comes up in organization, we need to install additional Java Stack on upgraded system. Please help me in provide some details to proceed further.
    1. Advantages of JAVA Stack (is there any performance issues after installing Java Stack?).
    2. How to install Java Stack with ABAP stack in Cluster Environment.
    Early response is highly appreciated.
    Regards,
    Kshitiz Goyal

    > We have recently upgrade from SAP R/3 4.7 ext. 20 SR2 to ECC 6.0 SR3 on Solaris platform using Oracle 10g. We are on Non-unicode system and on Single Stack i.e. AS ABAP only.
    >
    > Now as new requirement comes up in organization, we need to install additional Java Stack on upgraded system. Please help me in provide some details to proceed further.
    There are two issues here:
    a) double stack instances are deprecated, they shouldn't be installed any more. Install the Java instance as a separate SID, at best on a separate machine (or on a separate Solaris zone on the same machine). See Note 855534 - Dual Stack and SAP Business Suite 7
    b) Java stacks with non-Unicode backends are not supported (see Note 975768 - Deprecation of Java features with non-Unicode Backend)
    You may be able to technically install the Java AddIn with "some special DVD" but because your backend is non-Unicode this configuration would be unsupported.
    I highly suggest you first convert your system to Unicode before trying to connect them to a Java system.
    Markus

  • Java IDoc adapter in PI 7.3?

    Hi Gurus,
    As there has many new features added in PI 7.3 version,anyone advise how to test its IDoc(java) feature via some scenario?or suggest some scenario to assess the IDoc adapter based on java functionality.
    Any comment would be much appreciated.

    Hi Rajesh,
    refer below links, it gives clear picture
    http://help.sap.com/saphelp_nw73/helpdata/en/71/21dfa45a5143ae9fe115f8c62b1801/frameset.htm
    http://help.sap.com/saphelp_nw73/helpdata/en/c2/91865252c84716b3b8be394851c9c0/frameset.htm
    Regards,
    Raj

  • It seems that Java is not fully working in some pages

    Because of a crash, I had to completely uninstall Firefox 3.5.3 and I installed Firefox 3.6.3. After that, some Java features are not working any more. Here I attached an example, where the "plus" buttons do nothing, but when opening the page with IE there is no problem to expand the "plus". I have many extensions installed, I have also tried to disable them (even running Firefox sercure mode), as well as reinstall the last Java version, but nothing yet (Java seems to be correctly installed, since other features work ok, and official Java web page test works ok as well).
    == URL of affected sites ==
    http://http://www.uptamadrid.com/Portal/Organizacion/Sedes/Oficinas.aspx

    Thank you very much for your explanation about Java and Javascript! Very interesting, I didn't know! :-)
    Regarding your question... absolutely :-) it did work before. I have another example, but it is from a bank account and it is not public. It also worked before, but not any more. This is the code of the button (I don't know if this helps):
    javascript:sacarParametros();frmExtracto.Accion.value='AvanzaRetrocede';frmExtracto.Seleccion.value='SIGUIENTE';Movimientos_Posteriores();
    Thank you very much for your help!!

  • Ojc bug compiling simple java class

    Hi,
    I am trying to compile some very old Java code with JDeveloper 10.1.2.1.0 (Build 1913) and running into a very strange problem.
    I cannot use the "import" statement to import classes, which are stored in root without a package name specification.
    I think that the simple example will describe it better:
    Class1
    public class Class1
      public Class1()
      public String myGetClassName()
        return "Class1";
    }Class2
    import Class1;
    public class Class2
      public Class2()
      public static void main(String[] args)
        Class2 class2 = new Class2();
        Class1 cl1 = new Class1();
        System.out.println(cl1.myGetClassName());
    }The error message I am getting is pointing to the line 1 in the Class2.java, complaining that it needs a dot (.) after the Class1
    If I compile these classes with javac - it works fine
    Is it a bug or am I doing something wrong?
    Thank you,
    Vitaliy
    [2005-09-27] Logged a TAR with Oracle on Metalink
    Message was edited by:
    c001803

    yes, you are right, but then if I import the Class1 into, lets say, mypackage.Class3, I am having the same issue.
    Actually I received the problem resolution from Oracle. Here it is
    27-SEP-05 16:43:41 GMT
    Hello,
    There is no problem with your java source: no problem using your javac
    command (I think older than 1.4.x).
    You meet here the new JAVA feature which says something like "each
    class should belong to a package for the security problem". Please go to
    the sun site for more information on the new JDK feature.I was using JDK1.3.1_13 to compile the code with javac

  • Language experts: Port Java Code to AS3?

    Hello out there,
    I have been asked whether it would be feasable to translate Java code to AS3. This is a bit difficult since I am not really an expert in Java and only a beginner wrt AS3. Looking at some code samples it seems doable (at least in principle), but of course there might be hidden gotchas lurking. Hence:
    - Are there Java features which do not have an equivalent in AS3?
    - Does AS3 have prerequisites which do not exist in Java?
    - Other aspects to consider?
    Any comment or advice will be greatly appreciated.
    Best regards
    H.

    Thanks to you all.
    In the meantime I read "Actionscript for Java developers"
         http://www.javaworld.com/javaworld/jw-02-2009/jw-02-actionscript1.html
    and it seems like the two languages are not too far apart.
    Of course there are differences, but we only need to consider those features which Java has and AS has not (like method overloading) and modify our Java sources to not use these. Since the goal is not to have a universal tool which translates _any_ kind of Java source to AS but only our specific code base I think it will be worth a small effort to test how far we get with a machine translation.
    Yes, libraries may well be an issue - but again, I would have to see which (library) functions are actually used and how to replace them.
    Thanks again and best regards
    H.

  • I need Java SE 6 1.6.10

    Does this version of Java exist for Snow Lepoard?  If so, how can I get it.   An application I am trying to run required this version.

    In my opinion, you already have a version that is superior to version 10 and includes all the features of that version.
    I have not heard you say that there is any particular Java feature that is missing or damaged in some fashion, only that a single Tech Support person from a small company, with a strong incentive to get you off the phone,  sent you an a "fishing expedition" to find a version of Java that has already been superceded 14 times over.
    The version you have installed is the current version for the version of Mac OS X you are running. If their software will not run with it, the software vendor needs to provide a way to get the version they want you to use. You are not getting appropriate Support from these people.

  • Freemind won't run after install, can't find Java

    Hi,
    I attempted to install freemind using the following command:
    pacman -S freemind
    It installed along with the relevant Java dependency.
    When I try to run freemind I get the following error:
    which: no java in (/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin)
    ERROR: Couldn't find a java virtual machine,
    define JAVACMD, JAVA_BINDIR, JAVA_HOME or PATH.
    When I attempt to run 'freemind.jar' via java itself using the following command:
    /opt/java/jre/bin/java freemind.jar
    I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: freemind/jar
    Caused by: java.lang.ClassNotFoundException: freemind.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: freemind.jar. Program will exit.
    Any help would be much appreciated

    I can run Freemind - no problem. I have (previously) installed Java using jdk package
    There are two possible problems:
    1) Program's execute file is /usr/share/freemind/freemind.sh - it's shell script, so you will have to run it from terminal using command
    bash /usr/share/freemind/freemind.sh (it's how I ran it)
    Remember - you can't (usually) run Java programs from *.jar files, because Java has to have declared some variables first (that's what that shell script  is for - Windows are using their typical exe files for running Java programs )
    2) You don't have correct Java. There are two types of Java: opensource (openjdk) and "original" Java from Sun. openjdk is (fully) opensource, but lacks some of Sun's Java features, but because it's opensource, it's generally favourized (hope that it's the correct word) in Linux and Java-dependent packages in Arch usually installs that.
    Try uninstall both Freemind and whatever Java you are using now and install first java from Sun (packages jre and jdk, jdk is mostly for Java developers and should not be needed to run programs) and then install Freemind.
    Edit: It's possible that you will need to restart computer after installing Java (but probably not)
    Last edited by cybermage (2008-11-21 21:04:47)

  • Executable jars are running slow for certain features

    A weird problem occured one day. I started running my old jar -packed application. It took more than a minute to load the main window. Also updating file browser window is really slow when I browse from a folder to another. I also tested running other jar applications and they have similar problems. Everything works but certain task are extremely slow.
    I reinstalled jre1.6.0_07 but it did not help. Then I uninstalled all jdk's and jre's and installed jdk1.6.0_07 which came with jre1.6.0_07. No result. Do you have any idea where the problem is or what I could try next?

    Problem solved.
    It was the mingw that I installed as full installation. Full installation came with a java compiler, which made some specific java features really slow.
    Another problem was uninstalling it in a way that would have restored java as it was. I tried uninstalling mingw, manually removing mingw folder, cleared environment variables, removed and reinstalled all java etc. Finally, I just reinstalled everything beginning from OS on my computer

Maybe you are looking for

  • Error when executing javascript in WAD.

    Good day, I have created a web application that executes a javascript, the javascript has been defined in the Script web item. The javascript is executed by clicking on a Button web item. When I click on the button I get an IE error  Line 33 Char 7 E

  • IPod not recognized in iTunes updater or my computer

    I know this scneario has been worked over a lot lately but I have not found anything that works. About 2 weeks ago my computer stopped recognizing my Ipod, after working perfectly for a year. iTunes updater or my computer can't find it though Ipod do

  • Site works in IE, but not in Firefox

    First, some particulars:  I am on Windows 7, Internet Explorer 8, Firefox 4, and Flash player version 10.2.159.1. In making a few small updates to a website (no functionality changes, just cosmetic ones), I find that now the site will not work proper

  • CS6 not opening eps file, implementation limit, systemdict

    Hi Guys I'm having a bit of problem with my CS6 Illustrator and it started in illustrator CS5, I can create an eps file within Illustrator save it as CS6, but when i go to open it again i get an error " Can't open the illustration. The illustration e

  • Efficient way of updating data to database table

    what is the efficient way of updating data to database table  . i have huge amount of data in my internal table  , how to use update statement in this case . 1. database table having 20 fields  , 2. one is key field and suppose 20 th field i want to