Private or public class

I am new in java programing, so i need help about public and private classes.
I know that if a class is declarated public, i can create a object of that class in my own programs. Now.. in the API especification, the class Math, in java lang package, is declarated public. But when i wanted to create a Math object ( Math actuzo=new Math() ), my compiler tolldme that Math has private acces. BUT IN THE API DOCUMENT SAYS PUBLIC!!!
So, what happen?!!!

The constructor isn't accessible.... but the class is. As opposed to, for instance, java.lang.StringCoding. Which then isn't private, but package protected (no modifier).

Similar Messages

  • Best practice regarding package-private or public classes

    Hello,
    If I was, for example, developing a library that client code would use and rely on, then I can see how I would design the library as a "module" contained in its own package,
    and I would certainly want to think carefully about what classes to expose to outside packages (using "public" as the class access modifier), as such classes would represent the
    exposed API. Any classes that are not part of the API would be made package-private (no access modifier). The package in which my library resides would thereby create an
    additional layer of encapsulation.
    However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?
    Thanks in advance!

    Jujubi wrote:
    ...However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?I've always gone by this rule of thumb: Do I want others using or is it appropriate for others to use my methodes. Are my methods "pure" and not containing package speicific coding. Can I guarentee that everything will be initialized correctly if the package is included in other projects.
    Basically--If I can be sure that the code will do what it is supposed to do and I've not "corrupted" the obvious meaning of the method, then I usually make it public--otherwise, the outside world, other packages, does not need to see it.

  • Error: "Could not resolve [public class] to a component implementation

    Here's another clueless newbie question! :-(
    I define a public class "DynamicTextArea" at the top of the file, and get the compiler error message "Could not resolve <DynamicTextArea> to a component implementation" at the bottom of the same file.
    Clearly, I don't understand something very basic.
    (The code between the commenrted asterisks was originally in a separate package file, which I couldn't get either mxmlc or FlexBuilder to find, so rather than fight that issue now, I moved it into the same file.)
    Here's the file:
    <?xml version="1.0" encoding="utf-8" ?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    >
    <!--****************************************************************-->
        <mx:Script>
        <![CDATA[
      import flash.events.Event;
      import mx.controls.TextArea;
    public class DynamicTextArea extends TextArea{
        public function DynamicTextArea(){
          super();
          super.horizontalScrollPolicy = "off";
          super.verticalScrollPolicy = "off";
          this.addEventListener(Event.CHANGE, adjustHeightHandler);
        private function adjustHeightHandler(event:Event):void{
          trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
          if(height <= textField.textHeight + textField.getLineMetrics(0).height){
            height = textField.textHeight;    
            validateNow();
        override public function set text(val:String):void{
          textField.text = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set htmlText(val:String):void{
          textField.htmlText = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set height(value:Number):void{
          if(textField == null){
            if(height <= value){
              super.height = value;
          }else{      
            var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
            if (currentHeight<= super.maxHeight){
              if(textField.textHeight != textField.getLineMetrics(0).height){
                super.height = currentHeight;
            }else{
                super.height = super.maxHeight;        
        override public function get text():String{
            return textField.text;
        override public function get htmlText():String{
            return textField.htmlText;
        override public function set maxHeight(value:Number):void{
          super.maxHeight = value;
        ]]>
      </mx:Script>
    <!--****************************************************************-->
         <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          private var str:String = "This text will be long enough to trigger " +
            "the TextArea to increase its height.";
          private var htmlStr:String = "This <b>text</b> will be <font color='#00FF00'>long enough</font> to trigger " +
            "the TextArea to increase its height.";
          private function setLargeText():void{
            txt1.text = str;
            txt2.text = str;
            txt3.text = str;
            txt4.text = str;
            txt5.htmlText = htmlStr;
            txt6.htmlText = htmlStr;
            txt7.htmlText = htmlStr;
            txt8.htmlText = htmlStr;
        ]]>
      </mx:Script>
      <DynamicTextArea id="txt1" width="300" height="14"/>
      <DynamicTextArea id="txt2" width="300" height="20"/>
      <DynamicTextArea id="txt3" width="300" height="28"/>
      <DynamicTextArea id="txt4" width="300" height="50"/>
      <DynamicTextArea id="txt5" width="300" height="14"/>
      <DynamicTextArea id="txt6" width="300" height="20"/>
      <DynamicTextArea id="txt7" width="300" height="28"/>
      <DynamicTextArea id="txt8" width="300" height="50"/>
      <mx:Button label="Set Large Text" click="setLargeText();"/>
    </mx:Application>
         Thanks for any insight you can provide!
    Harvey

    Gordon:
        As you've noted, there were multiple  misunderstandings.
        Some are due to references in the language which are  different from uses in pre-existing languages.
        Take "name spaces". They look like URLs but they're  not. One of the first errors I made when starting Flex was to try to browse to  http://www.adobe.com/2006/mxml. I  figured that it would have some description of the language. But it didn't. In  spite of LOOKING like a URL, it doesn't point to anything; it's really just an  arbitrary magic incantation, like "Open Sesame".
        But, then when I wanted to use my OWN namespace, I  find that it's NOT arbitrary, and does have to point to something, but it's  still not a URL. The "AHA" moment was when Michael told me that "*" means "look  in this directory for a file with the name later named in an import statement,  but not named here". And if the file was in subfolder  "X" I'd have to use "X.*", while if it were a URL I'd use slash instead of  dot, but never an asterisk.
        When the language syntax is so contrary to the  expectations of people coming from a declarative language or web programming  background, I think it is important to explicitly address the differences and  disabuse them of their preconceptions. I think the same should apply to the ways  in which ActionScript differs from ECMAScript.
        Another problem adding to my confusion is the habit  of naming variables with the names of keywords but with capitalization changes.  Not only does that set readers up for subtle "gotchas", but makes it unclear  which names are truly arbitrary, and which are required by the  compiler.
    It might be a good idea to have a convention of an  identifiable format for user variables. Many authors use names like  myButton for that purpose.
        It would also be helpful if printed text could  simulate the syntax coloring of the better editors, or at least have more  in-source comments saying exactly what each line does. (Or both)
        Another aid to understanding would be to provide a  reference to the alternative (MXML or AS) way of doing anything, whenever you  demonstrate one of the ways.
        I find that the emphasis on using FlexBuilder  distracts from a sense of what is really going on behind the scenes. E,g.: If  FlexBuilder automatically sets up the folder structure, I don't learn to do it  myself. I like to work at the code level, so when something goes wrong I don't  have to worry about what level it went wrong at.
        Also, not everyone is willing to drop $600 or $250  BEFORE they've learned whether they even like Flex. Your tutorials are, by  definition, addressed to newcomers who may well not yet have committed to the  expense of FlexBuilder. So more emphasis on using mxmlc would be nice. It would  also be helpful to discuss how to use local servers, like Tomcat, during the  development stage.
        Thanks for asking my opinion. I'm afraid that my 40  years of programming experience may make it harder for me to adapt to this new  style of programming than it would be for a kid with a tabula rasa. But, it  looks like it'll be fun once I get over the hump!
    Harvey

  • How to get the private and public key?

    there is my code,i want to get the public key and the private key �Cbut i could not find the the approprite method to solve the problem.
    import java.security.Key;
    import javax.crypto.Cipher;
    import java.security.KeyPairGenerator;
    import java.security.KeyPair;
    import java.security.Security;
    public class PublicExample {
    public static void main(String[] args) throws Exception {
    if (args.length != 1) {
    System.err.println("Usage:java PublicExample <text>");
    System.exit(1);
    byte[] plainText = args[0].getBytes("UTF8");
    System.out.println("\nStart generating RSA key");
    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
    keyGen.initialize(512);
    KeyPair key = keyGen.generateKeyPair();
    System.out.println("Finish generating RSA key");
    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
    //System.out.println("\n" + cipher.getProvider().getInfo());
    System.out.println("\nStart encryption");
    cipher.init(Cipher.ENCRYPT_MODE, key.getPublic());
    byte[] cipherText = cipher.doFinal(plainText);
    System.out.println("Finish encryption:");
    System.out.println(new String(cipherText, "UTF8"));
    System.out.println("\nStart decryption");
    cipher.init(Cipher.DECRYPT_MODE, key.getPrivate());
    /*i want to get the private and public key in this method ,but i found the result was not
    the one i expected to get,how to solve the problem?
    thanks in advance!
    System.out.println("private key:" + key.getPrivate().toString());
    System.out.println("public key:" + key.getPublic().toString());
    byte[] newPlainText = cipher.doFinal(cipherText);
    System.out.println("Finish decryption:");
    System.out.println(new String(newPlainText, "UTF8"));
    thanks in advance!

    System.out.println("private key:" +
    " + key.getPrivate().toString());
    System.out.println("public key:" +
    + key.getPublic().toString());
    key.getPrivate() returns an instance of PrivateKey and key.getPublic() returns an instance of PublicKey. Since PublicKey and PrivateKey are interfaces then they will return one of the concrete implementations. Check out the Javadoc for PublicKey and PrivateKey.
    When you know which concreate implemenation you have then you can use the methods on that object (by appropriate casting) to find the information you want.

  • Are there non-public classes in Java SDK?

    Or are ALL classes in all packages of the Java SDK public?
    I have looked in the sources spot checking and didn't find a non public (default) class.
    If all classes are public, why?
    There exists a means in Java language to define a class as default ("class MyClass" instead of "public class MyClass") visibility. So why isn't it used by Java SDK (if this is really true)?

    I dont know what language you're programming in.
    If you don't specify
    public class
    or
    private class
    the class is "protected".
    Read the spec.If you read the spec, you'll see that, with respect to a class:
    (per section 6.6.2) Classes from outside the package the class lives in that extend the class have access to protected members.
    (per section 6.6.5) Classes from outside the package this thing lives in that extend this class do not have access to default members.
    Relevant part of section 6.6.5 (Example: Default-Access Fields, Methods, and Constructors) is:
    If none of the access modifiers public, protected, or private are specified, a class member or constructor is accessible throughout the package that contains the declaration of the class in which the class member is declared, but the class member or constructor is not accessible in any other package.
    This is default access, not protected access
    Lee

  • Public class or just simply class?

    As I continue my reading into various books there are some books which will have you add the access modifier public in front of your classname. Other books will just have you leave it out. I tried out a simple program that declared a class in a separate file and then the second file was the main class file with the main method.
    It didn't matter whether or not I removed the keyword public in front of the name of my class in the first file. The program compiled and ran just fine. So I'm doing some looking on the web trying to understand what the word public means when it's placed in front of your classname.
    According to Sun:
    A class may be declared with the modifier public, in which case that class is visible to all classes everywhere. If a class has no modifier (the default, also known as package-private), it is visible only within its own package (packages are named groups of related classes?you will learn about them in a later lesson.)
    I picked this up from some other source:
    Java provides a default specifier which is used when no access modifier is present. Any class, field, method or constructor that has no declared access modifier is accessible only by classes in the same package.
    So if I understand this correctly if I place the word public in front of my classname my class is visible to all classes and all packages?
    And if I don't place the word public in front of my classname then the class that I defined is only accessible only by other classes in the same package whatever that package happens to be?
    So if I wrote this:
    public class MyVehicle
    }Then if I imported a package called import.java.GiveMeSomePaintingTools;
    Then the classes contained in the GiveMeSomePaintingTools would have access to the MyVehicle class that I made?
    And if I just wrote this:
    class MyVehicle
    }Then the classes in the package GiveMeSomePaintingTools would not have access to the class I made?
    That's what I gather...
    Edited by: 357mag on Jun 3, 2010 5:53 AM

    357mag wrote:
    Then the classes in the package GiveMeSomePaintingTools would not have access to the class I made?The clue as to what access modifier to use for a class will often be in its name. Generally you write a class to do something. If what it does is something you want the whole world to be able to do, then use public; if it is only used by other classes of a package you've written, then use the default. The third one is protected: you use this when the class needs to be visible within a hierarchy (especially one that can be extended by anyone).
    As an example: [java.math.BigInteger|http://java.sun.com/javase/6/docs/api/java/math/BigInteger.html] is a class that allows you to store arbitrarily large integer values. Sun clearly felt that this was useful enough to allow anyone to have access to it, so it is public. However, it is defined as immutable: ie, once you've created a BigInteger object, you cannot change its value. This is not optimal for arithmetic, where you may have several operations to perform to get a result: If each of them is forced to create a new object, you could waste a lot of time (and space).
    So the designers created a class called MutableBigInteger which is used by the BigInteger class (and also by BigDecimal) to hold interim values for calculations. Since this class is only used by those classes, it is defined with the default modifier (which is why you've never seen it).
    HIH
    Winston

  • Convert VI from private to public

    Trying to make a private VI public. I clicked open the class from explorer and moved the file from private to public. Then I physically moved it from private dir to public. Class access now says public, saved the class. When I try to put it in a block diagram it is still private. What must I do?
    thanks,
    jvh 
    Solved!
    Go to Solution.

    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Track public classes, interfaces and methods by ID

    Hi All,
    I'm wondering whether there is a tool to assign a unique ID to classes, interfaces and methods (eg. within Javadoc) and track these IDs.
    The reason I'd need such a feature is that I'd like to do requirements tracking in an easy but complete way. I have a document containing functional specifications (with IDs) and on the other side there is the source code; where the javadoc of the public methods and classes is my software specification. What I now want to do is make a link between the IDs in the functional spec to the IDs in the sofware spec (ie. the source code).
    Does anybody know of such a tool (commercial or not)?
    Thanks,
    Daniel

    I'm a bit confused as to whether or not I understand you correctly. Please tell me if the following pseudocode is somewhat like the solution you are looking for:
    class MethodFunctionality {
       private Class methodClass;
       private String methodSignature;
       private List methodFunctions;
        *   Returns true if the method is used for the specified
        *   requirement, false otherwise.
       public boolean fulfills(int requirementId) {
          if methodFunctions.contains(requirementId)
             return true;
          else
             return false;
       public String getMethodSignature() {
          return this.methodSingature;
       public Class getMethodClass() {
          return this.methodClass;
        *   Returns an array with IDs of each functional
        *   requirement covered by the method.
       public int[] getCoverage() {
          return this.methodFunctions;
    class ClassFunctionality {
       private Map methodDetails;
       private List classFunctions;
       public MethodFunctionality getMethodDetails(String methodSignature) {
          return (MethodFunctionality) this.methodDetails.get(methodSignature);
        *   Returns true if the class is used for the specified
        *   requirement, false otherwise.
       public boolean fulfills(int requirementId) {
          if classFunctions.contains(requirementId)
             return true;
          else
             return false;
        *   Returns an array with IDs of each functional
        *   requirement covered by the class.
       public int[] getCoverage() {
          return this.classFunctions;
    }Mapping classes and methods to functionality like this would both allow you to query each class and method for all the functional requirements they claim to cover and would allow you to collect all classes and methods involved for a particular functional requirement.

  • Public class must be written in a seperate .java file?

    Hi,
    1. why is it compulsory for a public class to be written in a seperate .java source file?
    2. why can not a .java source file contain more than one public classes?

    Can you elaborate more on "to make it quicker for the compiler to import packages"Think what you'd do if you were the compiler and you needed to handle this code :
    package my;
    import my.gaphics.*;
    import my.util.*;
    class My {
      private Utility x;
    }How do you work out where to look for the source of class Utility? If you insist that all public classes are declared in a file with the matching name then you only need to check whether my/graphics/Utility.java or my/util/Utility.java exists, and there you have your source. Otherwise you'd need to parse all imported packages upfornt, since you can't tell which file will contain the source of Utility.

  • Property semantics - private vs public APIs

    Hi,
    Question about property directives and how to enable separate public and private semantics.
    In my class's public interface I would like a property to be read only so I declare it as follows:
    @property (readonly) someproperty;
    However, within the class I would like to set the property and have the convenience of retain being called and set to nil through the property so the release happens. So I would do the following:
    @property (retain) someproperty;
    Now the two semantics are not entirely mutually exclusive. I could do the following:
    @property (readonly , retain) someproperty;
    However, external users of the class can use the setter which is not what is intended. Coming from a Java and C# background it seems that objecive-c does not provide as robust a syntax for making clean distinctions between public and private interfaces.
    What strategies can you suggest to achieve my goals of keeping my private and public semantics and usage clear? Any good web resources on the broader subject of best practices in API design in objective-c?

    Yes class-dump can always be used to generate public interfaces in a hostile world but that's not really the point. The issue is how to generate clean interfaces for a team of software developers. Anyway after talking to Matt, I have answered my own question: a synthetic property, a category plus a hand coded setter will make this work. Once the bug in @synthesize is fixed this will be nice solution to the problem.
    Here are a few bits to illustrate:
    In MyClass.h
    @interface MyClass
    @property (readonly) id someProperty;
    @end
    In MyClass.m
    #import "MyClass.h"
    @interface MyClass (Private)
    @property (retain) id someProperty;
    @end
    @implementation MyClass
    @synthesize someProperty;
    // Bug - hand written setter needed since @synthesize will not generate one for me
    - (void) setSomeProperty: (id)newProperty
    if (newProperty != someProperty)
    [someProperty release];
    someProperty = [newProperty retain];
    @end
    Files that import MyClass.h will only have access to the getter while the setter is available to MyClass.m.

  • Why only one public class in one file

    why does java allows only one public class in one file?
    Why can not we have two or more public classes in file?
    Thank u.

    Note, you can have multiple inner classes.
    e.g.
    public class A {
        public static class B {   }
        public class C {   }
        private class D {   }
    }

  • Assosciation private and public

    I would like to have some responses from you guys. From OOAD point of view what are the considerations to be kept in mind before making an assosciation private or public.
    Any ideas would be welcome

    Containment associations will most often be private.
    Consider the following:
    Class Node is to be kept in a list which Class A manages.
    First example.
    Class Node is defined as a private inner class of Class A. Class A keeps a list of Nodes using a private instantiation of the ArrayList class. Node is private. The ArrayList is private. So when diagramming it the association is certainly private.
    Node is wholly owned and contained by A. If A is deleted then all Nodes are deleted.
    In this case one might make the point that because this is entirely private that it implementation rather than design. So it shouldn't be diagrammed at all. But sometimes it is necessary to do this to show how it will meet the needs of the system (or because a junior programmer is doing the coding and you want it to be painfully obvious.)
    Second example
    Class Node is a public class (not part of Class A.) Class A keeps a list of Nodes using a private instantiation of the ArrayList class. So when diagramming it the association is certainly private.
    Again in this case A owns all of the Nodes.
    Again the association could be consider an implementation detail (diagram is not necessary.) But because there are now external users, it might be more relevant to detail explicitly that a list of these is being kept.
    For the above two examples 'private' might also serve the need of the code generation capability of the two. Neither of the above associations should ever be implemented publicly.
    Third example
    A variation of the examples above is where the association is to be managed by one or more external systems. If there is one external system then it can own it. But if there is more than one, then the assocation must be public.
    In this case it is certainly possible (and likely) that A does not own the Nodes that it is associated with.
    Fourth example
    If the relationship between A to Node is many to many than the association is always external to A and Node. So unless it is explicitly owned by a single external system it must be public. Never make the mistake of trying to have either class try to own it.
    In this case A never owns the Nodes that it is assocated with.

  • Init() method: private vs. public

    I have a question:
    What is the difference in defining your init() method in a servlet as private vs. public since it is automatically executed when the class is instantiated?
    thanks

    cbreneman,
    For future reference,
    public void foo() {
        method vailable to all
    protected void foo() {
        method vailable to pacakge
    private void Foo() {
        method vailable to this
    }You can do this:
    public String bar;
    protected String bar;
    private String bar;You cannot do this:
    private void Foo() {
        public String bar = "Oops!";
    }For an Applet, init() is inherited when you extend the Applet class. It must be overidden if you have work to do before your subclass becomes active. It is defined by the superclass as public and void. If you were to create an init() method that was private and returned a String, you might (the compiler will stop you if you try to define init() twice) have a different method, but you would not have overidden public void init(). If you tried something like private void init() the compiler would stop you:
    init() in FooBar cannot override init() in java.applet.Applet; attempting to assign weaker access privileges; was public
    private void init() {
    ^
    1 error
    Make sense?
    With servlets, the init() method is there for slightly different reasons and to be honest, I am not sure that you inherit it? I believe it acts as a special constructor? I don't write many servlets, so I'll shut up and let someone who does give a better answer.
    Hope this helps.

  • Private static nested class

    Hi everyone,
    I'm practicing nested classes. I've written this simple class:
    public class OuterClass {
      private static class InnerClass {
         private InnerClass() {
            System.out.println("in constructor" }
    } and another simple class to test:
    public class TestClass {
      public static void main(String[] args) {
            OuterClass.InnerClass in=   new OuterClass.InnerClass();
    }All classes compile and main method runs with no problem. Now I wonder what is the meaning of the private modifier here ??
    Thanks

    Ok, I'm using Oracle's JDeveloper 3.2 ( jdk1.2.2). The code I posted compiles and runs with no errors in Jdeveloper.
    However, I tested this on the command line ( using javac directly ) and it does not compile !

  • Problem with constructors and using public classes

    Hi, I'm totally new to Java and I'm having a lot of problems with my program :(
    I have to create constructor which creates bool's array of adequate size to create a sieve of Eratosthenes (for 2 ->n).
    Then it has to create public method boolean prime(m) which returs true if the given number is prime and false if it's not prime.
    And then I have to create class with main function which chooses from the given arguments the maximum and creates for it the sieve
    (using the class which was created before) and returns if the arguments are prime or not.
    This is what I've written but of course it's messy and it doesn't work. Can anyone help with that?
    //part with a constructor
    public class ESieve {
      ESieve(int n) {
    boolean[] isPrime = new boolean[n+1];
    for (int i=2; i<=n; i++)
    isPrime=true;
    for(int i=2;i*i<n;i++){
    if(isPrime[i]){
    for(int j=i;i*j<=n;j++){
    isPrime[i*j]=false;}}}
    public static boolean Prime(int m)
    for(int i=0; i<=m; i++)
    if (isPrime[i]<2) return false;
    try
    m=Integer.parseInt(args[i]);
    catch (NumberFormatException ex)
    System.out.println(args[i] + " is not an integer");
    continue;
    if (isPrime[i]=true)
    System.out.println (isPrime[i] + " is prime");
    else
    System.out.println (isPrime[i] + " is not prime");
    //main
    public class ESieveTest{
    public static void main (String args[])
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    new ESieve(maximum);
    for(int i=0; i<args.length; i++)
    Prime(i);}

    I've made changes and now my code looks like this:
    public class ESieve {
      ESieve(int n) {
       sieve(n);
    public static boolean sieve(int n)
         boolean[] s = new boolean[n+1];
         for (int i=2; i<=n; i++)
    s=true;
    for(int i=2;i*i<n;i++){
    if(s[i]){
    for(int j=i;i*j<=n;j++){
    s[i*j]=false;}}}
    return s[n];}
    public static boolean prime(int m)
    if (m<2) return false;
    boolean x = sieve(m);
    if (x=true)
    System.out.println (m + " is prime");
    else
    System.out.println (m + " is not prime");
    return x;}
    //main
    public class ESieveTest{
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    public static void main (String[] args)
    int n; int i, j;
    for(i=0;i<=args.length;i++)
    n=Integer.parseInt(args[i]);
    int maximum=max(args[]);
    ESieve S = new ESieve(maximum);
    for(i=0; i<args.length; i++)
    S.prime(i);}
    It shows an error for main:
    {quote} ESieveTest.java:21: '.class' expected
    int maximum=max(args[]); {quote}
    Any suggestions how to fix it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • G5 Mac Tiger 10.4.11 w/Itunes 8.2.1(6) can't access store; wants me to download itunes 10.3 which isn't for Tiger

    Itunes 8.2.1 (6) won't let me into the store - it keeps offering me an upgrade to itunes 10.3 which isn't for my G5 Tiger 10.4.11 system.  Anyone know why?  I've already turned off "Check for Software Updates".  Sure appreciate your time with my prob

  • Installing Photoshop CS3 on Windows 8

    How can i install Photoshop CS3 on Windows 8 - install does not complete - error message "Installer Database corrupt".  The Abobe help chat system is unable to help. Rebooting my computer and re-downloading the software from the Adobe website for ano

  • JRE death - fatal error (EXCEPTION_ACCESS_VIOLATION)

    This always happens at [ntdll.dll+0x1b21a] And the stacktrace is exactly the same. # A fatal error has been detected by the Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c91b21a, pid=976, tid=4004 # JRE version: 6.0_14-

  • Linked lists in labview

    Hi I want to create a linked list in labview. How can i do that in labview? If its not possible how can i implement in labview?

  • Portal Page showing HTML content

    Using standard Portal components, is there a way to create a portal page with 1) left hand set of links to html pages. 2) on the right side is a portlet showing the html page. This is what 99% of websites do. The portal seems to have 1) single HTML p