java.util.Calenderis an abstract class with a method getInstance() which returns an instance of the Calender class.
x<y? a:(b=p*q);the return value would be variable a because the x is 1 and less than y = 2;
DOM | SAX |
---|---|
1. Tree of nodes | 1. Sequence of events |
2. Memory: Occupies more memory | 2. Does use any memory preferred for small XML documents preferred for large documents |
3. Slower at runtime | 3. Faster at runtime |
4. Stored as objects x | 4. Objects are to be created |
5. Programmatically easy, since | 5. Need to write code for creating objects objects are to reffered |
6. Ease of navigation | 6. Backward navigation is not possible as it sequentially processes the document |