About 50 results
Open links in new tab
  1. What is the difference between field, variable, attribute, and property ...

    Apr 12, 2012 · 4 The difference between a variable, field, attribute, and property in Java: A variable is the name given to a memory location. It is the basic unit of storage in a program. A field is a data …

  2. java - What is a field? - Stack Overflow

    Dec 8, 2015 · The Java Language Specification clearly states (emphasis mine): Accessing and or modifying these instance variables, which are freshly incarnated for each object through a named …

  3. java - Fields in interfaces - Stack Overflow

    Java allows describing methods, that is actions that the implementing object should be able to perform, but not any implementation details, thus, nothing about object fields or private methods. But what …

  4. What is the difference between getFields and getDeclaredFields in Java ...

    Jun 6, 2013 · 251 I'm a little confused about the difference between the getFields method and the getDeclaredFields method when using Java reflection. I read that getDeclaredFields gives you …

  5. oop - accessing fields of a class in Java - Stack Overflow

    person is eating grapes For accessing fields of a class, Object of that class is created. My question is: In Person class, how can I access fruitname field of Fruit class (i.e., writing f.fruitname) without …

  6. What are java object fields initialized with? - Stack Overflow

    From suns java tutorial It's not always necessary to assign a value when a field is declared. Fields that are declared but not initialized will be set to a reasonable default by the compiler. Generally …

  7. java - Why are all fields in an interface implicitly static and final ...

    Dec 1, 2015 · So it cannot have instance state, although interface fields can define constants, which are implicitly static and final. You cannot specify method bodies or initializer blocks in an interface, …

  8. java - Why can't an interface have fields? - Stack Overflow

    Aug 26, 2015 · public interface IModifier{ public String nameTag; public void foo(); } But Java doesn't allow interface to contain a field. Why is that? What to do in my case? My understand of the purpose …

  9. Why does Java have transient fields? - Stack Overflow

    May 26, 2009 · The transient keyword in Java is used to indicate that a field should not be part of the serialization (which means saved, like to a file) process. From the Java Language Specification, Java …

  10. java - What is a data field? - Stack Overflow

    Dec 3, 2016 · 3 A "date field" or "data member" is a variable which is part of the class, and holds some data. In this case, you have three data fields - hour, minute and second (all int s). Your task is to …