Search:

Type: Posts; User: SahilKabra; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. SQL Re: How to compare previous row with current in SQL?

    One way I could think of doing it is this:
    1. Add another column which indicates the row precendence. Something similar to:
    Col1 Col2 Row Number
    999 11 1
    888 22 2
    777 33 3
    666 ...
  2. Answers
    3
    Views
    1,763

    JSP Re: JSP Standard Tag Library

    JSTL helps in removing scriptlets from a JSP page. A JSP page ideally should not contain ANY java code(scriptlets). Generally these are used to iterate through a collection, print the values of...
  3. Answers
    9
    Views
    13,847

    JavaScript Re: Running Javascripts in Eclipse

    Hi,
    Could you elaborate on what you mean by Running Javascript. Javascript needs an HTML page to run; on some event like onload, onclick etc.

    JSEclipse plugins help you with Syntax Highlighting,...
  4. Answers
    1
    Views
    5,693

    Re: Component Class and Container Class

    I assume you are referring to the Swing Component and Container classes.
    The Component class is the super class of all components in swings. The component could be button, label, text etc.
    The...
  5. Answers
    2
    Views
    1,143

    Re: Call destroy() Method

    Yes, you can call servlet destroy() method in your init() method. However, the destroy() method is a callback method - called by the container to destroy your servlet - so when you call the destroy...
  6. Answers
    1
    Views
    1,030

    Re: Path and Class Path

    Path is where all the executables(mostly .exe files) are obtained from. EG: when you type java on the command line, windows will search the Path environment variable to find the location of java.exe...
  7. Answers
    1
    Views
    1,526

    Re: 'spaghetti code'

    Spaghetti code is a termed used for a piece of code that has no structure. Just like spaghetti, the code is all intermingled with each other. Such code is very difficult to maintain as well as debug....
  8. Thread: Interfaces

    by SahilKabra
    Answers
    5
    Views
    2,099

    Re: Interfaces

    Do a google search for Core Java Design Patterns. Go through the fundamental Patterns. This will help you in understanding the usage/importance of interfaces.

    Regards,
    Sahil
  9. Thread: wait

    by SahilKabra
    Answers
    4
    Views
    1,372

    Re: wait

    From what I understand by your question, you should be able to use Thread.sleep(<time in ms>).

    Regards,
    Sahil
  10. Answers
    3
    Views
    11,159

    Re: Diff b/w Eager loading and Lazy Loading

    For hibernate,
    lazy loading means that any foreign key references that you have in you table will be loaded only when referred to by the application.
    Eager loading means everything will be loaded...
  11. Thread: Hibernates

    by SahilKabra
    Answers
    1
    Views
    1,191

    Re: Hibernates

    The default configuration file used by hibernate in hibernate.cfg.xml.
    This file should be on the classpath. However, you do not have the same, hence it is throwing the exception. Use some other...
  12. Answers
    1
    Views
    1,400

    Re: List with out duplicates

    You could sort the list and then use some searching algorithm before insertion of any element.

    OR

    You could use a Set

    Regards,
    Sahil.
  13. Thread: Main method

    by SahilKabra
    Answers
    1
    Views
    1,261

    Re: Main method

    The JVM invokes the main method.
    Consider


    public class A {
    public static void main(String [] args) {
    ...
    }
    } Save this as A.java
    When you want to run this, you will first compile it using...
  14. Answers
    1
    Views
    1,159

    Re: related to servlet

    Your class should be public.

    Sahil.
  15. Answers
    2
    Views
    1,215

    Re: Inheriitance and Aggregation

    Inheritance is used for an IS-A relationship.
    Aggregation is used for a HAS-A relationship.

    EG:
    Cars, Scooters are vehicles. (Inheritance)

    Car has a steering, wheel etc. (Aggregation)

    In...
  16. Answers
    1
    Views
    1,205

    Re: Can we use throw alone

    Hi,
    Yes. You can use throw alone without using try catch.

    EG:
    public void foo() throws Exception {
    throw new Exception();
    }

    Throw is used to throw an exception.
    Throws is used in a...
  17. Answers
    3
    Views
    1,047

    Re: how to use valueof

    public static void main (String [] args) throws Exception {
    String number = "30";
    System.out.println(Integer.parseInt(number));
    }

    Please paste this in a java class file.
    ...
  18. Answers
    3
    Views
    1,047

    Re: how to use valueof

    Use
    Integer.parseInt("3");
    It throws an exception if the string contains an invalid number.

    Regards,
    Sahil.
  19. Answers
    1
    Views
    3,046

    Re: how can i increase heap memory?

    Hi,
    To increase the heap memory, use the following command when you execute your application:

    java -Xms32m -Xmx256m MyClassName

    In the above command,
    -Xms32m means that the minimum memory...
  20. Answers
    1
    Views
    3,182

    Re: JTable creation in swing

    Hi Venkat,
    To add data to a table dynamically, you will have to extend javax.swing.table.AbstractTableModel. In this class there is a method called getValueAt(rowIndex, colIndex). This method is a...
  21. Answers
    1
    Views
    1,315

    Re: Problem regarding FUNCTION

    Hi Heidi,
    This is my analysis:

    Take the string HEIDI.

    The first time the function will be called with
    f("HEIDI")
    Now the x.empty() will return false. So the control will call the function...
  22. Answers
    1
    Views
    1,223

    Re: Exception in thred Main Error

    Hi Ankit,
    It would have been better had you given the stack trace.
    But the problem you are facing usually occurs because of the following:-
    You may not have your classpath configured correctly....
  23. Answers
    1
    Views
    1,014

    Re: Using Collection

    Hi Gaurav0252,
    What you can do is to store all these Strings in an Array.
    Loop through the array comparing every element with every other element. You could also declare an integer array where you...
  24. Re: Programming using java, javascript, frontpage

    Hi Patkar456,
    From what you are saying what I understand is
    1. You will need an Html file that will be your front end.
    2. This HTML file will contain the Javascript.
    3. On the submit action...
  25. Answers
    3
    Views
    1,578

    Re: not platform independent

    Java by itself is not platform independant, it is the JVM which makes it platform independant. All java code runs withing the JVM and it is the JVM which interacts with the underlying OS.

    Regards,...
Results 1 to 25 of 42
Page 1 of 2 1 2
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact