Venkat Ramsimha

Ranch Hand
+ Follow
since Dec 28, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Venkat Ramsimha

still iam not clear as how the values are generated for x,y,z
x = 1 y = 2147483647 z = -559035650

can anybody explain?


thanks,
venkat
[class HexTest
{
public static void main (String [] args)
{
int x = 0X0001;
int y = 0x7fffffff;
int z = 0xDeadCafe;
System.out.println("x = " + x + " y = " + y + " z = " + z);
}
}]
OUTPUT:x = 1 y = 2147483647 z = -559035650

hi all,
with respective to the above program can anybody explain as how the output is generated?

thanks,
venkat
class Octal {
public static void main(String [] args) {
int five = 06; // Equal to decimal 6
int seven = 07; // Equal to decimal 7
int eight = 010; // Equal to decimal 8
int nine = 011; // Equal to decimal 9
System.out.println("Octal 010 = " + eight);
}
}

hi all,
with respective to the above program how come int five = 06,int seven=07...
and also whts the output for the above program?
can anybody provide the explanation for the above?

thanks,
venkat
barry can u please suggest as how i need to surround the code

tx
venkat
public class XIx
{
public static void main (String[]args)
{
String s = new String ("Hello");
modify(s);
System.out.println(s);
}
public static void modify (String s)
{
s += "world!";
}
}

hi all,
the output for the above program is "Hello" why not the output is "Hellocome"

thanks,
venkat
switch (i)
{
default:
System.out.printIn("Hello");
}
how can it be said that "byte" is the acceptable type for the variable i in the above program?
public class X11 implements Runnable
{
private int x;
private int y;
public static void main(String[]args)
X11 that = new X11();
(new Thread(that)).start();
(new Thread(that)).start();
}
public void run()
{
for (;
{
x++;
y++;
System.out.printIn("x=" + x + ", y = " + y);
}
}
}

hi all,
can anybody suggest as why the above program is giving compile time errors

thanks,
venkat
public class SyncTest
{
private int x;
private int y;
public synchronized void setX (int i) (x=1
public synchronized void setY (int i) (y=1
public synchronized void setXY(int 1)(set X(i); setY(i)
public synchronized Boolean check() (return x !=y
}

hi all,
can anybody suggest whts the output with the explanation for the above program?

thanks,
venkat
public class X090
{
private static int a;
System.out.println("" +a);
public static void main (String[] args)
{
modify (a);
}
public static void modify (int a)
{
a++;
System.out.println("" +a);
}
}

can anybody correct the compile time errors for the above program

thanks,
venkat
public class TestWipro
{
public static void replaceJ(String[] text)
{
text.replace ("j", "l");
}
public static void main(String args[])
{
String text = new String ("java")
replaceJ(text);
System.out.println(text);
}
}

hi all,
can anybody provide the output with explanation for the above program?


thanks,
venkat
public class TesttesT
{
public static void main (String []args)
{
unsigned byte b = 0;
b--;
}
}

hi all,
why the above program is giving compile time errors?anybody please suggest whts the output with the explanation?

thanks,
venkat
Which two create an instance of an array?
A. int[] ia = new int [15];
B. float fa = new float [20];
C. char[] ca = "Some String";
D. Object oa = new float[20];
E. Int ia [][] = (4, 5, 6) (1, 2, 3)

Answer: A, D

Hi All,
how is the above possible?

Thanks,
venkat
Thats fine but anybody can correct the compile time errors which iam facing and provide the explanation for that?

thanks in advance,
venkat