santhosh.R gowda wrote:Dear James
Please can you explain your answer more clearly...
santhosh.R gowda wrote:Dear All
As we know if we make class final the class cant be extend by another class
so my question is if we make class final what is the use of making methods final even though we cant override that method because we cant extending the class
so why in java API String methods are final
Cj Turner wrote:Thanks for the speedy reply, I since posting this have worked out my initial problem, and have moved onto others... This is my code as it stands,
Now the issue with this is, where I have
The second if statement returns the current value, while the first always returns 0,
I'm sure the tempNum is assigned a value before it reaches the if, so it should have something greater than 0 to store there?
Vishnu Sharma wrote:I have a doubt in it. It was given that if we do not use any super statement for calling a constructor of superclass in subclass, a superclass constructor with no arguments is called implicitly. But a compile time error occurs, if superclass does not has a constructor defined with no arguments.
My doubt here is when a default constructor is there for each class, and this default constructor has no arguments, then why this compile time error occurs??
Do we need to explicitly define the default constructor also in super class??
Michael Dunn wrote:the problem is here
newEvent = new NewEventForm(cg);
newEvent.requestFocus();
newEvent.setVisible(true);
NewEventForm is a modal dialog, so the requestFocus and setVisible lines are not executed until the dialog closes,
then, when closed, setVisible(true) is executed.
remove those requestFocus and setVisible lines and it should work OK.
[edit]
forgot to add that NewEventForm contains a setVisible(true) in it's constructor
Chinna Eranna wrote:sorry.. typo..
getNextElement() ---> nextElement()
Chinna Eranna wrote:you can use getAllAppenders() to read information related to Appenders.
And getCurrentCategories( ) of Category class to get the categories defined.
Note that getCurrentCategories( ) is deprecated..
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#getCurrentCategories%28%29
raj david wrote:Hi,
Apologies I will get familar with the tools available, I don't know how to do this yet.
I am coding in the following way....
C:\Sun\SDK\JDK\bin>javac SimpleDotComTestDrive.java
above complies but when I do the following
C:\Sun\SDK\JDK\bin> java SimpleDotCom
output shows as...
hit
failed
C:\Sun\SDK\JDK\bin>java SimpleDotCom
above complies but when I do the following
C:\Sun\SDK\JDK\bin> java SimpleDotCom
then this message is showing...
exception in thread "main" java.lang.NoSuchMethodError: main
But if I do Game one, which is
C:\Sun\SDK\JDK\bin>javac Game.java
then I get this error...
Game.java:1: package helpers does not exist
import helpers.GameHelper;
^
Thanks
Rob Prime wrote:What is this LSB_LO format? Do you have the specification for that?
And what's this "getBytes()" method? I hope you're not talking about String's getBytes() method? Because you cannot use Strings for binary files. To convert a binary file to a byte array use ByteArrayOutputStream; copy all data from the FileInputStream to the ByteArrayOutputStream, then call the latter's toByteArray() method to get the byte array.
Marcus Polk wrote:What is this. I'm reading Head First: Java.
It says that I'll need some type of j2se api documents. I need to download it and what not, but when I go to the java website, it just gives me a huge lump of text with some links...it's confusing. Why do I need this?
Also, how do I find out where it installed my SDK?
I usually have problems like this in the beginning thanks for the help!
~Marcus
Sgc Manorite wrote:
Originally posted by Jan Cumps:
As a last thing, can you please try to replace
with
Regards, Jan
Thanks for the help. I am not able to reproduce this issue on my local environment. Will have to monitor for this exception on production server after which I will update this post with my comments.