shuba karthik

Greenhorn
+ Follow
since Sep 03, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shuba karthik

Hi,

Without an instance of an object you can never access a non static method from a static context.
In the second program new Eggs() will create an instance of Eggs.
In other words you have created an object of Eggs.
Hope this clarifies your doubt.

Regards,
Subhakarthik
Hi,

There is no need to worry.
You need to think and act smart and wise.
Spend an hour preparing for SCJP everyday.(Must do)
In 20 days you might have finished reading the SCJP book.
Take mock exams and revise for the next 10 days.
Take the exam on 31st day.
Spend some 2 hours on a sunday to create your resume.
Post your resume to job sites.
Prepare yourself for the interview.
Attend the interview, get selected.
(But you may have to work for 12 hrs a day here too)
Advanced wishes.

Cheers,
Subhakarthik
Hi,

Thanks for the mock exam links.
I feel that I should have taken 1.5.
Please suggest me what to do next?

TIA,
Subhakarthik.
14 years ago
if equals() return true should compareTo() return 0
Even I am facing a similiar issue.
I have Windows XP and JRE1.5 installed in my PC.
I tried accessing http://www.javaranch.com/game/game2.jsp.
Instead of applet I get a X symbol on the top left corner.
Then I uninstalled JRE1.5 and Installed JRE1.3
I get an error message saying "java.lang.ClassNotFoundException:javaranch.roundup.applets.QuizApplet.class
Please help me resolve the issue.

TIA,
Subhakarthik
14 years ago
Hi,

I am working on a J2ME environment that supports CDC 1.0 and personalProfile 1.0 and the JVM supports AWT.
With 500X500 screen size the images are displayed properly.
If I change the screen size 350X450 none of the images are getting displayed.
However if I maximize the screen and resize window size back the images are visible.
We cannot go for swings because the JVM for PDA supports AWT only.
Please give your valuble inputs on this.

Thanks,
Subhakarthik
14 years ago
Hi,

With 500X500 screen size the images are displayed properly.
If I change the screen size 350X450 none of the images are getting displayed.
However if I maximize the screen and resize window size back the images are visible.
We cannot go for swings because the JVM for PDA supports AWT only.
Please give your valuble inputs on this.

Thanks,
Subhakarthik
14 years ago
Please see the code below

DateFormat startDateFormat = new SimpleDateFormat( "dd-MM-yyyy hh:mm:ss" ) ;
startDate = startDateFormat.parse( startDateNode.getText().trim() ) ;

I have the date object now.

Now I want to extract a string in "dd-MM-yyyy hh:mm:ss" this format from util.date object.

Thanks,
Subhakarthik
14 years ago
Hi All,

How can I get string from date object in <DD-MM-YYYY HH:MM:SS> format.

TIA,
Shubakarthik
14 years ago
Nidheesh,

Creme supports Personal Profile 1.0 and I do not know about the MIDP version it is supporting. I am trying your code snippet and it will be of great help if you send me the valid format of URL string that can be passed as parameter for com port connection object.

TIA,
Subhakarthik
14 years ago
Nidheesh,

Thanks for the effort.
We are trying to run this in PDA which has CREME JVM installed.
Our version of creme supports CDC 1.0 and MIDP 1.0 only.
Any pointers to APIs to access com port which use the limited features of CDC 1.0 and MIDP 1.0 will also be helpful.

TIA,
Subhakarthik
14 years ago
Hi All,

I am trying to send some instructions to a device which is connected to com port.
The method that I use is
public void enableReader() {
try {
OutputConnection outConnection = (OutputConnection)
Connector.open("comm:0;baudrate=8400");
OutputStream out = outConnection.openOutputStream();
PrintStream output = new PrintStream (out);
output.print("wp0b00") ;
output.flush () ;
output.print("X") ;
output.flush () ;
output.print("C") ;
output.flush () ;
output.close();
out.close();
outConnection.close();
} catch (ConnectionNotFoundException error) {

} catch (IOException error) {

}
}
I am getting 'The requested protocol does not exist'.
Please let me know what is wrong with this code or else please give me some code or links that explains communicating with com port.

TIA,
Subhakarthik
14 years ago
Are these methods related by any means?
Hi,

I know that multiple inheritance is not allowed in java.
I like to know what will happen for the following scenario:
There are two interfaces InterfaceA and InterfaceB.
Both these interfaces have a variable named 'i',and 'i' takes the value of 10 in InterfaceA and 20 in InterfaceB.
I am implementing these two interfaces in a class say Class1.
If I try to print the value of 'i' in Class1 what value will be printed?

Thanks,
Shubakarthik
16 years ago