About 176,000 results
Open links in new tab
  1. java - What is Instance Method? | DaniWeb

    Oct 3, 2012 · In Java, an instance method belongs to a particular object and operates on that object’s state. You can call it implicitly inside the same object, but from a static context (like …

  2. object oriented programming - Java constructors [SOLVED]

    An unqualified method call inside a constructor can legally invoke a class (static) method or an instance method depending on how that method is declared. Java permits simple-name …

  3. Semantic error: Cannot reach instance method: ... [SOLVED]

    Student is a class, that method is meant to be called using an instance, and not a class, reference. So, either create an instance of Student and call the method using that, or declare …

  4. java.util.Scanner; vs javax.swing.JOptionPane; [SOLVED] | DaniWeb

    Nov 23, 2012 · Take the example above and the 2 classes again java.util.Scanner; vs javax.swing.JOptionPane; how do I know that the method used in the first class isn't static and …

  5. .net - How to write to instance of a TextBox from ... | DaniWeb

    Dec 29, 2012 · What I want is for the event handlers to write something to the TextBox, but VB.NET complains that shared functions can't access instance objects. I know a work-around …

  6. Android -- cannot resolve method "getSystemService (String)"

    getSystemService(...) is an instance method on android.content.Context. You can call it unqualified only inside a class that is itself a Context (e.g., an Activity or Service). If you are in …

  7. python - how to retrieve the name of an instance ... [SOLVED]

    Aug 2, 2010 · I mean, I provide the filename as a string argument to this method, and the method should create the log and place things in it. What I want to do is that in the case of setting the …

  8. google - Android Native - How to Inject Hilt ViewModels | DaniWeb

    Jan 1, 2021 · * Use the [BlankFragment1.newInstance] factory method to * create an instance of this fragment. */ @AndroidEntryPoint class BlankFragment1 : Fragment() { // TODO: Rename …

  9. instantiating an ArrayList with out main method

    Apr 2, 2013 · If you want each instance to start with the same contents (as @stultuske hinted) while avoiding duplicated code across constructors (as @JamesCherrill noted), use an …

  10. java - Rational | DaniWeb

    This method should be a pure function; it should not modify the instance variables of the object on which it is invoked. You may want to write a method called gcd that finds the greatest common …