# Venkat Ramsimha

Ranch Hand
since Dec 28, 2004
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt Ranch Hand Scavenger Hunt Greenhorn Scavenger Hunt

## 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
16 years ago
thanks vishnu
16 years ago
[class HexTest
{
public static void main (String [] args)
{
int x = 0X0001;
int y = 0x7fffffff;
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
16 years ago
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
16 years ago
barry can u please suggest as how i need to surround the code

tx
venkat
16 years ago
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
16 years ago
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?
16 years ago
public class X11 implements Runnable
{
private int x;
private int y;
public static void main(String[]args)
X11 that = new X11();
}
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
16 years ago
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
16 years ago
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
16 years ago
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
16 years ago
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
16 years ago
Which two create an instance of an array?
A. int[] ia = new int ;
B. float fa = new float ;
C. char[] ca = "Some String";
D. Object oa = new float;
E. Int ia [][] = (4, 5, 6) (1, 2, 3)

Hi All,
how is the above possible?

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