Posts

Showing posts with the label out

Eclipse PDE: Everything about Editor Part 3

Image
Syntax Highlighting Part 3 of Eclipse PDE: Everything about Editor series deals with Syntax coloring. In previous post I have explained about all Eclipse Editor relegated concepts and document partition. I have tried to explains Syntax highlighting in editor in this post. Syntax highlighting helps to provides different color and styles to different part of code. Eclipse provides a presentation reconciler, which divides the document into a set of tokens that define the background and foreground color, along with the font style for a section of text. The document partitions define the content types within a document, while the presentation reconciler divided those individual content types into tokens for sets of characters that share the same color and font style. The presentation of the document must be maintained while the user continues to modify it. This is done through the use of a damager and a repairer . A Damager takes the description of how the document was modified and ...

Java Puzzle : Integer Initialization

Here is a simple program which instantiate Integer object using primitive int values with all possible ways, new operator, AutoBoxing , Integer.valueOf() . 1: package com.test; 2:   3: public class IntegerPuzzle { 4: public static void main(String[] args) { 5: Integer a = new Integer(100); 6: Integer b = new Integer(100); 7: Integer c = 100; 8: Integer d = 100; 9: Integer e = Integer.valueOf(100); 10: Integer f = 150; 11: Integer g = 150; 12: 13: System.out.println( "a = b ? " + (a==b)); 14: System.out.println( "c = d ? " + (c==d)); 15: System.out.println( "d = e ? " + (d==e)); 16: System.out.println( "a = c ? " + (a==c)); 17: System.out.println( "f = g ? " + (f==g)); 18: } 19: } What would be the output of  this program ?