- Q To set all checkboxes to true using javascript?
- Q Which was the first Road film featuring Bing Crosby and Bob Hope?
- Q Which function is used for sorting in r?
- Q Name the journalist and writer and leader of the influential Work Foundation research organization, bought by Lancaster University in 2010?
- Q How soon after exposure can HIV infection be detected?
- Q ‘Kandla’ situated on the Gulf of Kachchh is well known for which purpose?
- Q Which vitamin helps in blood clotting?
- Q By whom was capital of the Mughal Empire shifted from Agra to Delhi?
- Q Describe common problems of test automation.
- Q What are the business service events?
- Q What is the displayed part and work part. Where does it come?
Question
There are two array objects of int type. one is containing 100 elements and another one is containing 10 elements. Can you assign array of 100 elements to an array of 10 elements?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Answers
Yes, you can assign array of 100 elements to an array of 10 elements provided they should be of same type. While assigning, compiler checks only type of the array not the size.
public class MainClass
{
public static void main(String[] args)
{
int[] a = new int[10];
int[] b = new int[100];
a = b; //Compiler checks only type, not the size
}
} Your Comment
public class MainClass
{
public static void main(String[] args)
{
int[] a = new int[10];
int[] b = new int[100];
a = b; //Compiler checks only type, not the size
}
} Your Comment
- 0
- 0
- New Answer
- Contributors: *,
More Software Questions..
What is the inputsplit in map reduce software?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is software configuration management?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What Is Java Api For Xml-based Rpc (jax-rpc)?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How can you implement fine-grained auditing?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is IBM’s simple explanation for Big Data’s four critical features?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is static synchronized method in JDBC API? Give an example?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What does the NULLIF function do?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What happens if a start method is not invoked and the run method is directly invoked?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Should we override finalize method
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
what is the difference between mysql_fetch_array and mysql_fetch_object?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How will XML affect my document links?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Why to use Style Sheets?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are Filters in MVC?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can you explain Application layer in OSI model?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How to define new testplan attributes?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Which oracle package is used to manage the oracle lock management services?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is marker interface?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What types of partitioning are there for BW?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,