Correct Answer: String Args (String []) is an array of parameters of type String In Java, 'args' contains the supplied command-line arguments as an array of String objects In other words, if you run your program as 'java MyProgram Hello World' then 'args' will contain ["Hello", "World"] When a java class is executed from the console, the main method is what is called
2. Why static methods cannot access non static variables or methods?
Correct Answer: A static method cannot access non static variables or methods because static methods doesnt need the object to be accessed So if a static method has non static variables or non static methods which has instantiated variables they will no be intialized since the object is not created and this could result in an error
3. Explain static and dynamic memory allocation with an example each.
Correct Answer: When amount of memory to be allocated is known beforehand ie at the the time of compilation, it is known as Static Memory Allocation Once the memory is allocated statically, it cannot be deallocated during program run So it leads to wastage of storage space Example: int A[100]; When amount of memory to be allocated is not known beforehand, rather it is determined at the time of program run, it is called Dynamic Memory Allocation It leads to efficient utilization of storage space Example: cout << " Enter number of elements: "; cin >> N; int *A = new int[N]; // dynamic memory allocation
4. What is the difference between Tags and HTML Elements ?
Correct Answer: * HTML elements communicate with the Browser how to represent the text * HTML elements become HTML tags when enclosed within the angular brackets as "<>"
5. How can you make sure the web application is fit for release ?
Correct Answer: 1 We can operate majority of test cases, but importantly we can make use testing techniques such as Pair-wise testing to reduce combinations, and/or model based testing to plan user journeys to ensure major functionality of web application works or not 2 We can also use analytics to get insight into what users do on the website, which page is most popular and which feature is most used by the users
6. What is the role of the JIT compiler in .NET Framework?
Correct Answer: The JIT compiler is an important element of CLR, which loads MSIL on target machines for execution The MSIL is stored in NET assemblies after the developer has compiled the code written in any NET-compliant programming language, such as Visual Basic and C# JIT compiler translates the MSIL code of an assembly and uses the CPU architecture of the target machine to execute a NET application It also stores the resulting native code so that it is accessible for subsequent calls If a code executing on a target machine calls a non-native method, the JIT compiler converts the MSIL of that method into native code JIT compiler also enforces type-safety in runtime environment of NET Framework It checks for the values that are passed to parameters of any method For example, the JIT compiler detects any event, if a user tries to assign a 32-bit value to a parameter that can only accept 8-bit value
7. Which of the following gives the memory address of the first element in array?
Correct Answer: SBJson framework is supported by iOS It is a JSON parser and generator for Objective-C (Objective-C is the primary programming language you use when writing software for OS X and iOS It is a superset of the C-programming language and provides object-oriented capabilities and a dynamic runtime) SBJson provides flexible API's and additional control that makes JSON handling easy
Correct Answer: Intelligent Search and Siri- Intelligent Search is an excellent mechanism to learn user habits and act on that information- open apps before we need them, make recommendations on places we might like and guide us through our daily lives to make sure we?re where we need to be at the right time Siri is a personal assistant to the users, able to create contextual reminders and search through photos and videos in new ways Swiping right from the home screen also brings up a new screen that houses ?Siri Suggestions,? putting favorite contacts and apps right on your fingertips, along with nearby restaurant and location information and important news Deeper search capabilities can show results like sports scores, videos, and content from third-party apps, and you can even do simple conversions and calculations using the search tools on your iPhone or iPad Many of the built-in apps have been updated ? Notes includes new checklists and sketching features ? Maps now offers transit directions ? Mail allows for file attachments ? Apple Pay is being improved with the addition of store credit cards and loyalty cards ? Leading ?Passbook? to be renamed to ?Wallet? in iOS 9 San Francisco font, wireless CarPlay support An optional iCloud Drive app, built-in two-factor authentication and optional longer passwords for better security Performance improvements