IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

Java Programming - Language Fundamentals - Discussion

@ : Home > Java Programming > Language Fundamentals > General Questions - Discussion

Read more:

"Time and tide wait for none."
- Alexander Pope
4. 

Which is a reserved word in the Java programming language?

[A]. method[B]. native
[C]. subclasses[D]. reference
[E]. array

Answer: Option E

Explanation:

The word "native" is a valid keyword, used to modify a method declaration.

Option A, D and E are not keywords. Option C is wrong because the keyword for subclassing in Java is extends, not 'subclasses'.


Disha said: (Fri, Oct 1, 2010 08:50:22 PM)    
 
Hey, could you please give an example of using "native" keyword?.

Ijaz said: (Sun, Feb 27, 2011 11:15:49 PM)    
 
I want simple program for 'native' keyword?

Shubhrendu said: (Tue, Mar 22, 2011 06:24:36 AM)    
 
Its the example of native method............


import java.util.*;

class ReadFile {
//Native method declaration
native byte[] loadFile(String name);
//Load the library
static {
System.loadLibrary("nativelib");
}

public static void main(String args[]) {
byte buf[];
//Create class instance
ReadFile mappedFile=new ReadFile();
//Call native method to load ReadFile.java
buf=mappedFile.loadFile("ReadFile.java");
//Print contents of ReadFile.java
for(int i=0;i<buf.length;i++) {
System.out.print((char)buf[i]);
}
}
}

Kathirozhi said: (Mon, Sep 19, 2011 01:21:25 PM)    
 
Program cannot be run write by Shubhrendu.

please tell the output of that program.

Vishal Kumar Singh said: (Wed, May 9, 2012 03:32:03 AM)    
 
When we can modify the method declaration using "native" keyword in java ?

Write your comments here:
Name *:     Email:


© 2008-2012 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!