Tarun wadhwa

+ Follow
since Jan 29, 2011
Tarun likes ...
Eclipse IDE Tomcat Server Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tarun wadhwa

jmaster@Jmaster:~/Desktop$ javac Test.java
jmaster@Jmaster:~/Desktop$ java Test
Current time is : Thu Jan 01 08:55:45 IST 1970
Modified time is : Thu Jan 01 06:00:45 IST 1970

Your code was achieving what you desired for such things you first put your efforts, and do google and find the results then if still facing any problem post your queries...
ADVICE : and be cool when you are on java racnh if some one is devoting time to give answer you must value that no one is forced to give answer but if any one is giving and it don't satisfy you don't put a finger on him/her.
11 years ago
I Want to write some query in which i have to fetch data from different tables and i have some check to be implemented
As in programming we have IF ELSE conditional checks to alter the flow similarly i want to put some checks in Hibernate
Query Language so i hope some on will Guide Me ASAP

1) For CORE JAVA you can go for thinking in JAVA or Cay S. Horstmann book for deep study or you can go for SCJP Study guide by Kathy Sierra and bert bates if you ant to do certification of core JAVA, for better understanding of the books referred above.

2) If you want to move for advance JAVA then you can go for Head First SERVLET JSP by Kathy Sierra and berth bates and this also prepare you for certification of WEB component of advance java.
12 years ago
Thanks to all of you your reply's helped me for the better understanding of my problem.
12 years ago
The same Code mentioned above, if i run on windows platform it prints distinct special characters may i know the reason behind and with a detail explaination
12 years ago

Output is:

macs-macbook:desktop mac$ javac Test.java
macs-macbook:desktop mac$ java Test

(after 4 ?'s there is a space shown for division operation by JVM)
12 years ago
hi campbell ritchie,

i apologize for my big mistake.

thanks for highlighting my mistakes.
13 years ago
hi Mike Simmons,

I will keep in mind that such mistakes i will not repeat again in future.

thanks Joanne Neal for highlighting the main context that was my mistake.
And yes there i mean that for instance variables.

@Amit Ghorpade
In an abstract class you can keep both abstract and non-abstract methods, but in interfaces all methods are abstract by default

even if you write an interface like this:

interface Bounceable{

void setBouncHeight();
void getBouncHeight();

Compilers see it as:

interface Bounceable{

public abstract void setBounceHeight();
public abstract void getBounceHeight();

Once again thanks a lot for pointing my mistakes.
13 years ago
Hi Joanne Neal,

Nope the methods in an interface are by default "public abstract".

about this very well explained above by respected Budsy Remo.

Only variables in an interface are public static final.

public: so they can be accessible through out the application any where.

static: so that only one copy of that exist.

final: so that no one can change the value of it in the entire program.
13 years ago
Hi Abalfazl Hossein,

the code you have mentioned in line 17 there is a mistake

mehe a= new meh(500,14000,1000) ;

change mehe to meh.

and the reason why it returns the value of "m" 0(Zero) when you print it because you have made it static and static variables are loaded when the first time class name has been called and it can't see Instance Variable or non static methods.

And by default value of int is assigned 0(Zero), that's why you are getting Zero when you try to print that

I hope now the things will be more clearer and understandable to you.

13 years ago
Interfaces are 100% abstract class and we create an interface to have some special functionality in our class.

The methods are implicitly "public and abstract" so that the class implementing must override as per the requirement.Even your compiler checks for that.

And the interface methods are by default public static final, because their value should no be by any implementing class.
For example a constant in a Math class "pi" exist if its value has been changed may cause a Blunder in Math Standard principle that use that value.

I hope you get the things. I tried to made it simple for better understanding.

"The more you play with it, the more you will learn"
13 years ago

int size = score.length;

Just ADD these 2 line before the for loop you will get the answer of your question.

"The more you play with It the more you learn"
13 years ago