Core Java Interview Questions – Set 12

Can a double value be cast to a byte Yes, a double value can be cast to a byte. Is the ternary operator written x : y ? z or x ? y : z It is written x ? y : z. Can an abstract class be final An abstract class may not be declared as final. What is the difference … Read more

Core Java Interview Questions – Set 11

What is Domain Naming Service(DNS)?- It is very difficult to remember a set of numbers(IP address) to connect to the Internet. The Domain Naming Service(DNS) is used to overcome this problem. It maps one particular IP address to a string of characters. For example, www. mascom. com implies com is the domain name reserved for … Read more

Core Java Interview Questions – Set 10

What methods are used to get and set the text label displayed by a Button object? getLabel() and setLabel(). What is the difference between choice and list? ?– A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected … Read more

Core Java Interview Questions – Set 09

How are commas used in the intialization and iteration parts of a for statement Commas are used to separate multiple statements within the initialization and iteration parts of a forstatement. When are the non static variables loaded into the memory They are loaded just before the constructor is called What modifiers can be used with a … Read more

Core Java Interview Questions – Set 08

What values of the bits are shifted in after the shift In case of signed left shift >> the new bits are set to zero. But in case of signed right shift it takes the value of most significant bit before the shift, that is if the most significant bit before shift is 0 it … Read more