Sai Ram9

Greenhorn
+ Follow
since Feb 13, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sai Ram9

Can anyone explain me these lines from Carl's Notes:
GridLayout with container larger han components expands to fill its container provided that the number of components matches the rows*columns.
--Empty rows are given space, while empty cols are not.
-- if there aren't enough components, it will try to fill its rows first.
Fawad,

Instance of Enclosing class is a must for creating an instance of Inner Class.
Congrats Ashish,
Can u please tell me what kind of tricky questions u will get in awt?
Congrats Ashish,
Can u please tell me what kind of tricky questions u will get in awt?
24 years ago
int i = 45678;
int j = ~i;
System.out.println(j);
what does this print? please explain.....
class MyClass
{
static int maxelements;
MyClass(int maxelements)
{
this.maxelements = maxelements;
}
}
public class Q19
{
public static void main(String[] args)
{
MyClass a = new MyClass(100);
MyClass b= new MyClass(100);
if(a.equals(b))
System.out.println("objects have the same value");
else
System.out.println("objects have different values");
}
}
answer says: objects have different values.
Please somebody explain me....
Paul i still didn't completely understand canonicalpath.
Redudancy in sense without any \.. or \. etc..?
what happens to the other java folder,
c:\paul\java\..\java\temp\myfile.txt
there are 2 java folders right?
Thanks latha. good and clear explanation.
Can anyone explain me whats getCanonicalPath() and getAbsolutePath().
i read that getAbsolutePath() returns the absolute path including the parent directories and as well including the file name itself from where u onvoke this method.
for eg: C:\java\javastudy\file1.txt
is this correct?

how does getAbsolutePath() work?
please explain......
Thanks a lot Rosie and Rajani, ur explanations really helped me a lot!
public class Q21
{
int maxelements;
void Q21()
{
maxelements = 100;
System.out.println(maxelements);
}

Q21(int i)
{
maxelements = i;
System.out.println(maxelements);
}
public static void main(String[] args)
{
Q21 a = new Q21();
Q21 b = new Q21(999);
}
}
answer says compilation error at
Q21 a = new Q21()
how explain?
what will happen if you compile/run this code?
public class Q10
{
public static void main(String[] args)
{
int i = 10;
int j = 10;
boolean b = false;
if(b = i ==j)
System.out.println("true");
else
System.out.println("false");
}
}
Answer says True... Please explain!
Hi iam planning to take my SCJP soon sometime next week. Please help me with my doubts!
1,4 are wrong no idea about 5
1 should be substring()
4 should be toUpperCase()
24 years ago