Search:

Type: Posts; User: rohan22

Page 1 of 2 1 2

Search: Search took 0.26 seconds.

  1. Help regarding choosing J2EE book for studying

    Hello,
    I have just completed studying core java using the book "The Complete Reference Java 7th edition" by Herbert Schildt.
    I now wanted to start gaining knowledge in Java 2 Enterprise...
  2. Replies
    2
    Views
    722

    Re: which edition of java ee to learn?

    So sorry......Thanks anyways.......

    By the way any help to my question
  3. Re: What's the difference between a static and non-static method?

    As i said here is certain changes to your queries

    1)methodUser.nonStaticMethod();.............. works fine.

    2)methodUser.staticMethod();...............you can simply call as...
  4. Re: What's the difference between a static and non-static method?

    If you want a particular method of a class (w.r.t its access specifiers) to be called, without creating an object of that class we usually make it as static.
    But on the other hand if you want a...
  5. Re: Is it possible to reference Variables from another class

    Use static variables. They are class variables.You will always get updated values when they are altered between methods of different classes.
  6. Replies
    2
    Views
    722

    which edition of java ee to learn?

    Hello ,
    I want to start gaining knowledge about the Java EE. Right now i have a book called Java Server programming J2EE 1.4 Black book Platinium edition by Kogent Solutions Inc from Dreamtech...
  7. Replies
    12
    Views
    518

    [SOLVED] Re: related to static! need help

    Cool............ thanks.....
  8. Replies
    12
    Views
    518

    [SOLVED] Re: related to static! need help

    Yes i got to know that m is int and not static int in netbeans debugger when i review the contents of m.


    But my question was can static methods have non static variables also.And yes i can...
  9. Replies
    12
    Views
    518

    [SOLVED] Re: related to static! need help

    Yes I have tried and its working Fine.Try the below code:



    class D {
    int k;

    void fill(int g) {
    k = g;
    System.out.println("k is " + k);
  10. Replies
    12
    Views
    518

    [SOLVED] Re: related to static! need help

    I think i am very close to solving it.Just tell me one thing.Now(below i have written a short code about
    the scenario) suppose if i have a static method X(). And in that if i declare a variable...
  11. Replies
    12
    Views
    518

    [SOLVED] Re: related to static! need help

    Hey....For my first program, to access Stack3 class i have created an object called stackcopy and accessing an nonstatic method push(int ele) from main() of Doubt1 class.And in my second program...
  12. Replies
    12
    Views
    518

    [SOLVED] related to static! need help

    Hello,
    Below is my code for Stack implementation.



    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package doubt1;
  13. Re: Can any one have some logic for this problem?

    I am extremely Sorry......
  14. Re: Can any one have some logic for this problem?

    Hello Rakesh !

    Below is the code i have written it for you.......Hope it meets your requirement.



    ...edited by moderator

    Let me know if you require any changes....Happy coding:cool:
  15. Re: Why main(String args[]) method needs to be public?

    Awesome..... thanks a lot.....But we are back to the square in giving the answer....."the JLS says so....".Yes i agree not much information
    is available on net on this topic.But will keep the...
  16. Re: Why main(String args[]) method needs to be public?

    Yea i got your point.....As in java if we don't specify with any access specifier its package protected.I totally agree with you.
    Coming back to my piece of code:-
    class Helloworld{
    public static...
  17. Re: Why main(String args[]) method needs to be public?

    If main doesn't work without public then I assume there must be valid reason for it to be public.Something related to its syntax specification.
    Anyways thanks a lot. Like you my search for this is...
  18. Re: Why main(String args[]) method needs to be public?

    Hey please let me know the reason.....it would be great.......! else this question will start eating my until I am convienced....

    Thanks a lot
  19. Why main(String args[]) method needs to be public?

    Considering a simple Helloworld program

    class Helloworld{
    public static void main(String args[]){

    System.out.println("This is Hello World Program");

    ...
  20. Re: current directory not dectected by java application launcher in command prompt

    Hey thanks for ur timely reply(Ya i will do it like u said for command prompt copying....sorry for putting up an image).
    But my problem is unsolved.Why should i once again say java In2.Bwoi after...
  21. current directory not dectected by java application launcher in command prompt

    Here is the following scenario

    my classpath in environment variables is .;D/Javarohan; (current directory already specified)

    my files are in location D:/Javarohan/In2

    Filename in In2...
  22. Replies
    2
    Views
    1,955

    use of System.out.println(""); error....

    Hi all,
    Cant we use System.out.println within class scope ? Like the one shown below:


    class A{
    int a=1;
    System.out.println(" a is " +a); //giving error ... understandable...
  23. Replies
    2
    Views
    2,341

    [SOLVED] method inside main()

    Hi,
    In structured programming language like c we could create a method in main().In java its not possible.Why? Or is there any way we can create a method in main using keywords like static or...
  24. [SOLVED] Re: Help regarding Superclass variable can reference subclass object

    Yea..! got it.
  25. [SOLVED] Re: Help regarding Superclass variable can reference subclass object

    Thanks friend for your solution.Yea its too confusing to visualize this concept.But most importantly by using a superclass variable
    to reference a subclass object we are just explaining the code to...
Results 1 to 25 of 28
Page 1 of 2 1 2