User Profile
Collapse
-
Er Model
I am in a case when a weak entity set has a realtionship with a strong entity set.Now it is required to make a relationship with another strong entity set on which it does not depend.Can the relationship be established? -
No!! take this as example:
class Why
{ int a[] ={1,5,8,3,0,6};
String S ="Why it happen";
int l_array,l_strin g;
l_array = a.length; // return 6
l_string = S.length(); // return 13
}
I mean Why a.length;
and
S.length(); -
Paranthesis use
Well ! I have a confusion.When we length of an array we just use a.length; but to find length of an string we use S.length();.Why paranthesis are not used in case of array,however to call any method we use paranthesis?
I have a other problem too,i created an object of self defined class MyObject.Now how can i give the string behavior to the object i made,for e.g. the objects can be concated(concat ed because object should behave like... -
Thx ,
but then why error is occuring in following code:
::::::::::::::: ::::::::::
class D
{public static void main(String as[])
{ String S ="Hello";
char a[] = Breakit(S);
for(int i =0;i<S.length() ;i++)
System.out.prin tln(a[i]+"-");
}
static char Breakit(String S)
{char a[] = new char[S.length()];
for(int...Leave a comment:
-
Returning array
Hello! I am new in java.Can any body tell me how to return an array and to access it also......
Is it
return a; // a[] is an array from method static How
// and to access
int c[] = How();
No activity results to display
Show More
Leave a comment: