What will be the output of the following Java code?
class output
{
public static void main(String args[])
{
String c = “Hello i love java”;
int start = 2;
int end = 9;
char s[]=new char[end-start];
c.getChars(start,end,s,0);
System.out.println(s);
}
}
a) Hello, i love java
b) i love ja
c) lo i lo
d) llo i l
Answer: d
Explanation: getChars(start,end,s,0) returns an array from the string c, starting index of array is pointed by start and ending index is pointed by end. s is the target character array where the new string of letters is going to be stored and the new string will be stored from 0th position in s.
Output:
llo i l
Related Posts
Empdt1(empcode, name, street, city, state, pincode).
For any pincode, there is only one city and state. Also, for given street, city and state, there is just one pincode. In normalization terms, empdt1 is a relation inWhich forms are based on the concept of functional dependency:
Which forms has a relation that possesses data about an individual entity:
Which forms simplifies and ensures that there are minimal data aggregates and repetitive groups:
Which is a bottom-up approach to database design that design by examining the relationship between attributes:
Functional Dependencies are the types of constraints that are based on______
Which-one ofthe following statements about normal forms is FALSE?
Join The Discussion