# Monthly Archives: October 2017

QUICK ENQUIRY FORM

### WHAT WILL HAPPEN WHEN YOU SUBMIT THIS FORM

• After submitting the enquiry, you will be contacted by our team.
• Trainers(IT Professionals) may contact you if you need any clarification.
• Your contact information will be kept highly confidential & not be shared to 3rd Parties.
Quick Enquiry

## Learn Java Typecast through simple programs

Hi friend, This blog will help to better understanding of typecasting of datatypes in Java. PROGRAM: public class TypeCasting { public static void main(String[] args) { int a = 140; byte b =(byte) a; System.out.println(b); } } OUTPUT : -116 EXPLANATION: This type of type casting will have loss of data. Lets see how 140 changes into -116 by simple binary calculation. 140 decimal value convert into binary number of 16 bits integer – 16 bits value of 140 is 0000000010001100 byte – 8 bits value of 140 is 10001100 [1] 000110 – first digit represent the sign of number 1 – negative value 0 – positive value so as per above reference,we will get negative number. make the binary the 2’s complement 111001 000001 ————— 111010 ————– by adding 0 on the last digits – 1110100 convert 1000111 binary into decimal, 116 Now combine the sign and number will be result of -116

## Finatel Technologies Interview Programs with Answers

Finatel Technologies Interview Programs with Answers In this blog we are going to discuss about Finatel Technologies Interview Programs with Answers . Let us explain it below : _____________________________________________________________________________________ Hi, This is Muthuvel. Recently, I attended Finatel Technologies Interview. Here, I am posting one of the Finatel Technologies Interview Programs with Answers. Please have a look. The program asked in Finatel is, I am given with two arrays of integers. Both the arrays are not sorted. I am requested to merge both the arrays in sorted order. One condition given is – I should not use any in built methods to sort the arrays. I tried a lot to get the output and here is my outcome. Kindly go through and let me eagerly wait for your feedback. Finatel Technologies Interview Programs with Answers public class FinatelMergeTwoArrays { public static void main(String[] args) { int[]a = {9,7,3,5,1};  // First Array, not sorted int[]b = {2,4,6,8,11,10}; // Second Array, not sorted  int[]c = new int[a.length+b.length];  // Third Array to be created  int count = 0;int v=1;  // check ‘v’ is initialized here for(int i = 0; i<a.length; i++) { c[i] = a[i];  // Adding array a’s contents to c array count++; } for(int j = 0;j<b.length;j++) { c[count++] = b[j];  // Adding array b’s contents to c array } for(int i = 0;i<c.length;i++){ for(int k=0;k<c.length;k++){ if(c[k]==v){  // verifying the value to print is ‘v’ or not.   System.out.print(c[k] + ” “);   } } v++; } } Output:  1 2 3 4 5 6 7 8 9 10 11