Error accessing class from method

I am trying to write a method that accesses a class called circle where the user inputs the radius of a circle and the program prints the area, radius and circumference.
My class is as follows.
public class Circle
private double Radius;
private double PI = 3.14159;
public void setRadius(double rad)
Radius = rad;
public void setPI(double pi)
PI = pi;
public double getRadius()
return Radius;
public double getPI()
return PI;
public double getArea()
return PI * Radius * Radius;
public double getDiameter()
return Radius * Radius;
public double getCircumferance()
return 2 * PI * Radius;
I am not having any areas when compiling the class.
The method is as follows.
//IS 115
//DED01
//Method for Circle class
//Larry Piatt
public class CircleStats
public static void main(String[] args)
double number;
Scanner keyboard = new Scanner(System.in);
Circle Radius = new Circle();
Circle Area = new Circle();
Circle Diameter = new Circle();
Circle Circumference = new Circle();
System.out.println("What is the radius of the circle? ");
number = keyboard.nextDouble();
number.setRadius(number);
System.out.println("The area of the circle is "
+ Area);
System.out.println("The diamter of the circle is "
+ Diameter);
System.out.println("The circumference of the circle is "
+ Circumference);
The error that I am seeing are as follows
^
CircleStats.java:28: double cannot be dereferenced
number.setRadius(number);
^
1 errors
This is my first attempt at writting a method that calls a class. I am not understanding it very well yet. Any assistance would be greatly appreciated.
Edited by: tooned on Mar 30, 2008 1:10 PM

1) your error: You're trying to call a method, setRadius, on the variable, number, which is nothing more than a lowly double primative variable. Better to call the method on your Circle object which here you call "Radius" (please note the Java naming convention: objects should begin with a lower-case letter).
Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
[code]
  // your code block goes here.
  // note the differences between the tag at the top vs the bottom.
[/code]or
{code}
  // your code block goes here.
  // note here that the tags are the same.
{code}Your formatted code would look something like so:
public class Circle
    private double Radius;
    private double PI = 3.14159;
    public void setRadius(double rad)
        Radius = rad;
    public void setPI(double pi)
        PI = pi;
    public double getRadius()
        return Radius;
    public double getPI()
        return PI;
    public double getArea()
        return PI * Radius * Radius;
    public double getDiameter()
        return Radius * Radius;
    public double getCircumferance()
        return 2 * PI * Radius;
import java.util.Scanner;
class CircleStats
    public static void main(String[] args)
        double number;
        Scanner keyboard = new Scanner(System.in);
        Circle Radius = new Circle();
        Circle Area = new Circle();
        Circle Diameter = new Circle();
        Circle Circumference = new Circle();
        System.out.println("What is the radius of the circle? ");
        number = keyboard.nextDouble();
        // number.setRadius(number);
        Radius.setRadius(number);
        System.out.println("The area of the circle is " + Area);
        System.out.println("The diamter of the circle is " + Diameter);
        System.out.println("The circumference of the circle is "
                + Circumference);
}

Similar Messages

  • ABEND RSBOLAP (000): error in class SAPMSSY1 method - after report move Pro

    Hi Guys,
    We recently moved a report to production and got the following error (500 Internal Error) when executing from Query designer
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    I saw in one of the threads to run the Program RSPOR_SETUP and see if all the 12 steps are ok and they are not but they are not ok in Dev and Qua as well where its running fine. Appreciate if somebody can advise.

    Hi,
    Check your Query in RSRT properties tab and make necessary settings.
    Do OLAP check in RSCRM_BAPI t-code. It will show the inconsistencies in your query.......
    Regards,
    Suman

  • Program error in class SAPMSSY1 method

    We are on 2004s SP10. I can create queries fine, but can not save them. I created a bex default transport. When I check the query it says it is fine. The error I am getting is "Error in Class SAPMSSY1 Method". I also get an error referencing a 26 or so bit program saying it does not exist. I have not found any threads which from out SP level that match these errors. Any idea? Thanks Steve

    This is an issue with Fiscal Year Variant Variable in the query.  (Or at least that was our team's issue).  To solve this, you have to rebuild the qurey from scratch.  Attempting to edit the existing query will NOT fix the issue.  Trying to fix it, creates a loop were it again looks for fiscal year variant variable then produces the error.
    I solved this be rebuilding the query and adding 0FISCVAR last.  Then in the filter, I chose K4 instead of a variable or SAP exit. (sorry if you requirement needs a variable, i would suggest creating a new one of those too).  Then save and you should have a working query.
    Yes when you check it appears fine, but in the background it is not.  When you save the "correct" query, the system looks for the old 0FISCVAR variable and fails to save.

  • BPM Scenario :  " Error accessing table SXMS_AS_STATUS method: INSERT"

    Hi all,
    Webservice --> XI -->BW .
    BPM has been used to send to send the response back.
    BPM :
    start ->Receive(Request)> Transformation(Responsemap)>Send(SendtoR/3)->Send(Send Response) ---> stop.
    We are getting the error as " The error is <SAP:Stack>Error accessing table SXMS_AS_STATUS method: INSERT</SAP:Stack>
    There are some messages that Webservice sent and XI received them but this error occured during some process in XI. and this is causing some discrepancy in the data sent and received.
    Any idea what might be the problem ? Is there anything which I need to change in the parameters to rectify this error?
    -Deepthi.

    Hi
    Just check this note , can get some clue
    SAP-Note 1124049
    Regards
    Abhishek

  • How do I access classes and methods defined in a wsdl file

    I have been provided a wsdl file I need to find out how do I access classes and methods defined in a wsdl file directly instead of doing a wsdl2java...

    Several comments :
    1- is there any reason to have blank chars inserted after the path ? Seems that you already have a problem there. If possible, try to solve the problem at the source
    2- the end of line char is usually CR (Carriage Return, aka ASCII char 13 = $0D = Control-D). But LF (Line Feed = 10 = $0A = control-A) is also used (platform dependent). In LV, you can use the "Concatenate strings" function to add/insert control chars (found in the String Control Palette). However, this will not solve your problem of unwanted added blank chars at the end of your string.
    3- you can use the Trim white space.vi (in the "Additionnal string functions" sub-palette) to remove ALL the spaces in your string
    4- you can build your own "end space remover" function. :
    reverse the string, wire to a "Match pattern" function, use " +" (space + "+") to search for any number of spaces, reverse again the "after substring".
    5- there is no point 5 :-)
    You may find interesting description of ASCII chars here
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION in Report

    Hi All,
    This is the frequent problem we are facing in BW production.
    While executing the BW reports
    We are getting the below error.
    No Space left in Shared memory.
    Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION in Report.
    An exception with the type CX_SY_EXPORT_NO_SHARED_MEMORY occurred, but was neither handled locally, nor declared in a RAISING
    Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    System error in program SAPLRRK0 and form INITIALIZE_DATA_ACCESS-01
    The problem solved when we restarted the server.
    but this is coming very frequent.
    Is there any permanent soln for this one.
    Pls advice.
    Thanks!
    Sanjay

    Hi,
    Check the below notes,
    Note 656060 - OLAP: Cache main memory displacement not functioning
    Note 1114164 - Termination in the cache due to insufficient shared memory
    Apply note 1114164  and check if issue resolves or not.
    Regards,
    Niraj

  • Program error in class sapmssy1 method : uncaught_exception

    Hi Friends,
    I am executing Balance sheet report in portal while displaying the out put I am getting the below error message
    u201CError Brain (068): Characteristic value 18 of characteristic 0GL_ACCOUNT is not ALPHA-converted
    Program error in class sapmssy1 method : uncaught_exception u201C
    Can you please provide the solution on this?
    Thanks
    srini R

    this sounds like an R/3 data quality issue...if the alpha conversion routine is not put in the infoobject maintenance you need to put the alpha conversion hardcoded in the start routine. then reload everything...
    M.

  • Program error in class SAPMSSY1 Method When Filtering on Source System ID

    Whenever I try to filter my Source System ID in the BEx Query Designer (BI 7.0), I get the error:
    Reading Characteristic Values
    Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION.
    And I cannot filter my Source System ID.
    Does anybody know how to resolve this?

    Hi,
    Check the below notes,
    Note 656060 - OLAP: Cache main memory displacement not functioning
    Note 1114164 - Termination in the cache due to insufficient shared memory
    Apply note 1114164  and check if issue resolves or not.
    Regards,
    Niraj

  • ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCE

    Hello,
    A BI Report contains a field "X" & a field "Y".
    Y is a sub part of X. Means on clicking upon X, Y opens.
    This report runs on date basis. For each date Y contains Zero value, but in the result Y contains some value greater than zero.
    Now when i execute this report in Portal, clicking on X for the dates opens up Y.
    But in the result column, Clicking on X giveg the following error:
    Root Cause
    The initial exception that caused the request to fail was:
    Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    Pl. note that this report is running fine in BEx analyer & not giving any such error.
    Thanks & Regards

    In SE 38 run RSPOR_SETUP and see if all the 12 steps are ok, as I see this is a an issue with java server not able to commute with BI., you need to exchange java certificates to BI and vise versa.,(basis can do this step)
    Hope this helps.,

  • Error-- Referencing classes from project 1 in project 2 using libraries option

    Using JDev 9.0.3
    I'm struggling with an error that's occuring that I know should not be...
    I have two projects (SessionUtils & TradingSumStruts).
    SessionUtils has 4 java files all of which have a package name of: com.arca.sessionutils.
    TradingSumStruts has 3 java files all of which have a package name of: com.arca.tradingsum.
    One of the java files in TradingSumStruts imports a class from SessionUtils
    import com.arca.sessionutils.SessionUtil;
    In TradingSumStruts project I have created a new user library and called it: SessionUtilsLib. This lib points to the classes directory of SessionUtils, and the src directory of SessionUtils in the same workspace.
    I've shut down the oc4j server, deleted any existing class files for the above two projects, and recompiled both projects. When I run the app, I get the following error:
    java.lang.NoClassDefFoundError: com/arca/sessionutils/SessionUtil
         void com.arca.tradingsum.TradingSumInfo.<init>(javax.servlet.http.HttpServletRequest)
              TradingSumInfo.java:67
    when I attempt to call SessionUtil.xxxMethod().
    I have double and triple checked my spelling, my library entries, my class files, and even re-booted my machine.
    ANY ideas would be greatly appreciated!
    -Teri
    [email protected]

    Don't use libraries for this. Define a project dependency for your project using the project properties dialog. This will automatically include your project classes without hardcoding the path into a library.

  • Error Accessing internet from the flex application.

    Hi
    I am getting the following error while runningm my flex
    application deployed on the OC4J server. The error did not come
    when I was running the application directly from the flex builder.
    However , after deploying it on the application server my
    flex application cannot access the internet and in turn
    throws this error. Does this have anything to do with the
    'crossdomain.xml' file, which most probably does not exist on my
    server. If that is the case, please can somone let me know as to
    where exactly do I put the 'crossdomain' file.
    [RPC Fault faultString="Security error accessing url"
    faultCode="Channel.Security.Error" faultDetail="Destination:
    DefaultHTTP"]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()
    at mx.rpc::Responder/fault()
    at mx.rpc::AsyncRequest/fault()
    at ::DirectHTTPMessageResponder/securityErrorHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
    TIA
    ~Shishir

    This file goes in the"root of the web server". Now tis is not
    very helpful so here are some examples:
    IIS default:
    C:\Inetpub\wwwroot
    Flex 1.5 "integrated Jrun" default installation
    C:\Program Files\Macromedia\Flex\jrun4\servers\default
    Tomcat:
    C:\Program Files\Apache Software Foundation\Tomcat
    5.0\webapps
    If in doubt, put one everywhere until it works, then take
    them out until it breaks.
    Use the universal permission until you get it working:
    <allow-access-from domain="*" to-ports="*" secure="true"
    />
    Tracy

  • Access class from seperate loop

    Here's where I'm at. I need at access the data members of the positioner class from the second loop. I cant seem to figure it out.
    As you can see... I'm new at LVOOP.
    Solved!
    Go to Solution.

    First quick answer is "the indicator on the outside of the loop will not update until the loop is done.
    If inside just prior to SR, sure you can get away with it but you are opening up a situation ripe for a race conditions.
    Singlton is the LVOOP answer.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Generating Ruby Web Service Access Classes from a WSDL

    If you have tried to consume a web service from Ruby you surely have noticed how annoying is to write manually all the Ruby code just to invoke a service with complext input parameters' structure:
    - You have to know what do the input parameters, their structure and type look like;
    - You have to write Ruby classes for them to encapsulate the structures;
    - You have to instantiate these classes and pass the objects to the web service proxy class;
    - You have to interprete the output parameters.
    All this is not impossible of course, but if you are just consumer of the web service and not the developer, if you don't have the exact documentation, you have to read the WSDL description of the service and create the Ruby classes (structures) for the parameters.
    Fortunately there is a small, though handy tool, called <b>wsdl2ruby.rb</b>. It accomplishes all these boring tasks for you.
    In the following example I will try to show you how <b>wsdl2ruby</b> can be used to generate Ruby classes for accessing a SAP NetWeaver web service, called <b>CreditChecker1</b> (a web service for checking if a person is reliable credit consumer).
    To generate the necessary classes we will create a ruby script. Let us name it <b>ws2rgen.rb</b>. Here is what this file looks like:
    # Import the wsdl2ruby library.
    require 'wsdl/soap/wsdl2ruby'
    require 'logger'
    # Callback function for the WSDL 2 Ruby generation options.
    def getWsdlOpt(s)
         optcmd= {}
         s << "Service"
         optcmd['classdef'] = s
         #should work but doesn't, driver name is derived from classname
         #if you specify both it breaks, same thing for client_skelton
         #optcmd['driver'] = s
         optcmd['driver'] = nil
         #optcmd['client_skelton'] = nil
         optcmd['force'] = true
         return optcmd
    end
    # Create logger.
    logger = Logger.new(STDERR)
    # Create WSDL2Ruby object and generate.
    worker = WSDL::SOAP::WSDL2Ruby.new
    worker.logger = logger
    # WSDL file location.
    worker.location = "http://mysapserver:53000/CreditChecker1/Config1?wsdl"
    # Where to generate.
    worker.basedir = "temp"
    # Set options.
    worker.opt.update(getWsdlOpt("Service"))
    # Heat.
    worker.run
    The procedure is straightforward. First we create the WSDL2Ruby object, set its properties <b>location</b> and <b>basedir</b> and then set all other options via the callback function <b>getWsdlOpt()</b>. For further information about these parameters one could consult the source code of wsdl2ruby or contact the developers. Nevertheless the default options are pretty satisfactory. With the last line we start the generation. Two Ruby files will be generated in the <b>temp</b> folder, which is a subfolder of the script's current folder. <b>Please, create the folder "temp" before executing the script.</b>
    This generates two files. The first one is <b>CreditChecker1Wsd.rb</b>, containing the necessary data structures:
    require 'xsd/qname'
    # {urn:CreditChecker1Vi}areReliable
    class AreReliable
      @@schema_type = "areReliable"
      @@schema_ns = "urn:CreditChecker1Vi"
      @@schema_qualified = "true"
      @@schema_element = [["persons", "ArrayOfPerson"]]
      attr_accessor :persons
      def initialize(persons = nil)
        @persons = persons
      end
    end
    # {urn:CreditChecker1Vi}areReliableResponse
    class AreReliableResponse
      @@schema_type = "areReliableResponse"
      @@schema_ns = "urn:CreditChecker1Vi"
      @@schema_qualified = "true"
      @@schema_element = [["response", ["ArrayOfboolean", XSD::QName.new("urn:CreditChecker1Vi", "Response")]]]
      def Response
        @response
      end
      def Response=(value)
        @response = value
      end
      def initialize(response = nil)
        @response = response
      end
    end
    # {urn:CreditChecker1Vi}isReliable
    class IsReliable
      @@schema_type = "isReliable"
      @@schema_ns = "urn:CreditChecker1Vi"
      @@schema_qualified = "true"
      @@schema_element = [["person", "Person"]]
      attr_accessor :person
      def initialize(person = nil)
        @person = person
      end
    end
    # {urn:CreditChecker1Vi}isReliableResponse
    class IsReliableResponse
      @@schema_type = "isReliableResponse"
      @@schema_ns = "urn:CreditChecker1Vi"
      @@schema_qualified = "true"
      @@schema_element = [["response", ["SOAP::SOAPBoolean", XSD::QName.new("urn:CreditChecker1Vi", "Response")]]]
      def Response
        @response
      end
      def Response=(value)
        @response = value
      end
      def initialize(response = nil)
        @response = response
      end
    end
    # {urn:java/lang}ArrayOfboolean
    class ArrayOfboolean < ::Array
      @@schema_type = "boolean"
      @@schema_ns = "http://www.w3.org/2001/XMLSchema"
      @@schema_element = [["boolean", ["SOAP::SOAPBoolean[]", XSD::QName.new("urn:java/lang", "boolean")]]]
    end
    # {urn:com.sap.scripting.test.services.creditchecker.classes}Person
    class Person
      @@schema_type = "Person"
      @@schema_ns = "urn:com.sap.scripting.test.services.creditchecker.classes"
      @@schema_element = [["age", "SOAP::SOAPInt"], ["name", "SOAP::SOAPString"], ["purse", "Purse"]]
      attr_accessor :age
      attr_accessor :name
      attr_accessor :purse
      def initialize(age = nil, name = nil, purse = nil)
        @age = age
        @name = name
        @purse = purse
      end
    end
    # {urn:com.sap.scripting.test.services.creditchecker.classes}Purse
    class Purse
      @@schema_type = "Purse"
      @@schema_ns = "urn:com.sap.scripting.test.services.creditchecker.classes"
      @@schema_element = [["color", "SOAP::SOAPString"], ["money", "Money"]]
      attr_accessor :color
      attr_accessor :money
      def initialize(color = nil, money = nil)
        @color = color
        @money = money
      end
    end
    # {urn:com.sap.scripting.test.services.creditchecker.classes}Money
    class Money
      @@schema_type = "Money"
      @@schema_ns = "urn:com.sap.scripting.test.services.creditchecker.classes"
      @@schema_element = [["amount", "SOAP::SOAPDouble"], ["currency", "SOAP::SOAPString"]]
      attr_accessor :amount
      attr_accessor :currency
      def initialize(amount = nil, currency = nil)
        @amount = amount
        @currency = currency
      end
    end
    # {urn:com.sap.scripting.test.services.creditchecker.classes}ArrayOfPerson
    class ArrayOfPerson < ::Array
      @@schema_type = "Person"
      @@schema_ns = "urn:com.sap.scripting.test.services.creditchecker.classes"
      @@schema_element = [["Person", ["Person[]", XSD::QName.new("urn:com.sap.scripting.test.services.creditchecker.classes", "Person")]]]
    end
    The second file is <b>CreditChecker1WsdDriver.rb</b>. In it you can find a generated child class of SOAP::RPC::Driver, containing all methods of this web service, so you don't need to add every method and its parameters to call the web service.
    require 'CreditChecker1Wsd.rb'
    require 'soap/rpc/driver'
    class CreditChecker1Vi_Document < ::SOAP::RPC::Driver
      DefaultEndpointUrl = "http://mysapserver:53000/CreditChecker1/Config1?style=document"
      MappingRegistry = ::SOAP::Mapping::Registry.new
      Methods = [
      def initialize(endpoint_url = nil)
        endpoint_url ||= DefaultEndpointUrl
        super(endpoint_url, nil)
        self.mapping_registry = MappingRegistry
        init_methods
      end
    private
      def init_methods
        Methods.each do |definitions|
          opt = definitions.last
          if opt[:request_style] == :document
            add_document_operation(*definitions)
          else
            add_rpc_operation(*definitions)
            qname = definitions[0]
            name = definitions[2]
            if qname.name != name and qname.name.capitalize == name.capitalize
              ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
                __send__(name, *arg)
              end
            end
          end
        end
      end
    end
    There is a problem with this script, since the <b>Methods</b> array is empty. I suppose it is due to the imports in the SAP NetWeaver WSDL, maybe wsdl2ruby is not mighty enough to handle these WSDL imports. When I succeed in overcoming this, I will post again in this thread to let everybody know.
    Message was edited by: Vasil Bachvarov

    Hi,
    I find Ruby to be really tough to consume SAP WebServices. For simple scenarios like currency conversion may it is good. But for complex scenarios such as Purchase Order entry etc..I found it very annoying to use wsdl2ruby and see that it didnt generate correct proxies.
    Until wsdl2ruby is stable enough to support complex datatypes, authentication etc. my recommendation is to use JRuby and use Java Proxies generated by NW Developer studio until pure Ruby's web service support improves.
    Following link might be of interest w.r.t wsdl2ruby
    http://derklammeraffe.blogspot.com/2006/08/working-with-wsdl2r-soap4r-and-complex.html
    Regards
    Kiran

  • Weird Can not access class from outside package problem

    Hi, I have this problem and it seems the error message is very clear what the problem is but I did make the GeneralTestResult class PUBLIC already. What could be wrong? I did search for it but this is too general and didn't find any solution. Anyone can point out the problem? TIA.
    public abstract class GeneralTestResult
      public static int FAILING_THRESHOLE = 25;
      public abstract String getTestName();
      public abstract boolean isPassed();
      public abstract int getLeftEyeResult();
      public abstract int getRightEyeResult();
      public abstract Calendar getTestDate();
    // in a different file
    package VisionSaver.Tests.TestResults;
    import java.util.*;
    public class AcuityORContrastTestResult extends GeneralTestResult
      private String m_testName;
      private int m_leftEyeVision, m_rightEyeVision;
      private Calendar m_testDate;
    // in a different file
    package VisionSaver.Tests;
    import VisionSaver.Tests.TestResults.*;
    public class Acuity extends VirtualKeyboard implements ActionListener, Runnable, WindowListener
    AcuityORContrastTestResult r = new AcuityORContrastTestResult(...);
    }The compiling error is:
    "Acuity.java": GeneralTestResult() in VisionSaver.Tests.TestResults.GeneralTestResult is not defined in a public class or interface; cannot be accessed from outside package at line 529, column 40

    The GeneralTestResult class is a packaged class. Sorry, when I cut and paste, I didn't copy everything. So here is the complete GeneralTestResult file:
    package VisionSaver.Tests.TestResults;
    import java.util.*;
    public abstract class GeneralTestResult
      public static int FAILING_THRESHOLE = 25;
      public abstract String getTestName();
      public abstract boolean isPassed();
      public abstract int getLeftEyeResult();
      public abstract int getRightEyeResult();
      public abstract Calendar getTestDate();
    }From the compiler's message, it seems like the import is OK. It just won't allow me to access non-public class but my classes here are declared public. Any other ideas? TIA

  • Conn Method Access - Calling from method

    Hi I am trying to create a method in another class to call another method that checks for userid in DB? What is the best way to set this up? I.e. calling method?
    //calling method below line
    private boolean setuserExist(String username) {
         else return false;
    public String getserExist() {
              return userexist;
    // Method being called below this line
    public boolean userExist(String username){
              boolean exist = false;
              System.out.println("in LoginDBAccess: username is " + username);
              try{
    Connection conn = dbc.getConnection();
    Statement statement = conn.createStatement();
    String query =      "SELECT User.UserID " +
                        "FROM User " +
                        "WHERE User.UserID = '" + username + "'";
    ResultSet resultSet = statement.executeQuery(query);
    System.out.println("1.1");
    ArrayList result = new ArrayList();
    while(resultSet.next()){
         //System.out.println("In While:");
    ArrayList item = new ArrayList();
    item.add(resultSet.getString("UserID"));
    result.add(item);
    System.out.println("LoginDBAccess Count: " + result.size());
    conn.close();
    if (result.size() == 1){
         exist = true;
              }catch(Exception e){
         e.printStackTrace();
              return exist;
         }

    http://forum.java.sun.com/thread.jspa?threadID=603496
    Cross-post.

Maybe you are looking for

  • How I can send pdf document  file in I pad

    How I can send pdf Document file in I Pad

  • Wine 1.2 released have a few questions

    First off this seemed like the right place to post if not sorry. I was wondering if this would be a replacement for bin32-wine considering according to the Slashdot article http://tech.slashdot.org/story/10/07/16 - lashdot%29 it supports 32-bit and 6

  • Handeling mapping with multiple nodes

    Hi,             We are doing an IDOC to SOAP scenario, in which we have multiple nodes in source structure. In destination structure we have one node having multiple occurences (1..99). We are trying to do the mapping in such a way that on the basis

  • Terms and conditions repeated accept/decline messages

    Everytime I open iTunes (the last several weeks), I'm asked to accept T&C again and again. I have to re-establish sync from iPhone to PC. This is mostly annoying, and I'm concerned sync isn't working correctly. Any help out there on this issue? I see

  • Secure L2 Switch

    Topology 2 F.W.s modules on cluster mode connected to 2 cat2950 switch (not support SSH) The policy here is not give an IP address to the switchs on behalf of security (by cisco recommend of allowind only SSH sessions). 1. Is it popular not to give a