QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How to communicate between Java and C++?

FAQ on C/C++/Unix by Roseanne Zhang, Java Programmer Certifi...
Socket: you can pass any information from C/C++ to Java or Java to C/C++. However, if you want to call each other's method/function. You will find out you need to you need to marshal and unmarshal your methods by yourself. You're creating your own protocols. You'd be better off use CORBA. Corba is just for what you want, you use IDL to write your the function or methods, then compile it to C/C++ and Java to use.

Do I need to know C++ before Java?

Java and C++ are meant for two different purposes. Of course they are two widely used OOPLs (Object Oriented Programming Languages). Knowing one is not a prerequisite to another. However, C is the prerequisite to both these language as these two use the same control structures of C.

Why is Kannel written in C and not in Java?

Kannel: Open Source WAP and SMS Gateway
The Kannel team does not have a strong expertise in Java, so re-implementing Kannel in Java would require us to spend weeks learning the language well. The re-implementation work itself would also take some months. There is no point in doing this.

Why do you not teach C++ or JAVA?

FAQ
Even though we have on staff several teachers who have computer science/programming backgrounds, we feel that these are not appropriate languages to teach the concepts of programming and have kids create a project on their own that they can be proud of. The software we use have been given numerous awards by educational technology magazines and are chosen as to their merit to teach programming.

How can I interface to C / Java?

scheme-faq-standards
Most Schemes support a so-called "foreign function interface" (FFI) to the native language (i.e. the language in which the Scheme interpreter/compiler was implemented). FFIs provide the following features: Calling native code from Scheme The most basic FFIs allow you to write functions/methods following certain conventions and then call these native functions/methods from Scheme.

What is the difference between Java and C++?

Java Language FAQs
Java is a roubust and platform independent language which is used to develop business and internet applications. Function and class Templates. Java has Generics (which are simlar to Templates though not same) in version 5.0

Will we ever get Java?

Answers to Some Frequent webtv.users Questions
According to posts in webtv.users from Steve Perlman, ex-president of WebTV, WebTV has been working to provide a form of Personal Java for the WebTV Plus terminal (and possibly the new Classics and Dishplayer, but nothing was said specifically about them as they were not announced products at the time of the posts)?there is no guarantee this will happen. For the full text of Steve's posts, click here.

How to define arrays in Java, C/C++, and C#? Are they different?

JavaChina: SCJP Questions & Answers by Roseanne Zhang (8...
float[] only applies to the first variable of the right variable list. float[] f1d_a, f1, f1d_b[]; // is equivalent to float f1d_a[]; // or float[] f1d_a; float f1; // f1 is not an array float f1d_b[]; // or float[] f1d_b; In Java, better, but still confusing!! float[] applies to all variable of the right variable list.

What is the Java equivalent of C++ friend"?

Java Programmer's FAQ
The keyword "friend" in C++ is a hack to allow a piece of code to access the private member declarations of another class. In Java, you would do this by labelling, not the friend, but the private members. Instead of making them private, make them protected. Classes in the same package have automatic "friendship" in that they can access each other's protected fields. Yes, only it's better and simpler to use in Java. It's called the Java Generic Library.

Is it possible to invoke GCJ compiled Java code from a C++ application?

The GCJ FAQ - GNU Project - Free Software Foundation (FSF)
What license is used for libgcj? libgcj is distributed under the GPL, with the 'libgcc exception'. This means that linking with libgcj does not by itself cause your program to fall under the GPL. See LIBGCJ_LICENSE in the source tree for more details. How can I contribute to libgcj? You can send simple bug fixes in as patches. Please follow the GCC guidelines for submitting patches. For more complex changes, you must sign copyright over to the Free Software Foundation.

Why is MTL written in C++ and not Java?

Matrix Template Library Frequently Asked Questions
The Java language was developed for certain particular purposes. Scientific computing was not one of those purposes. Generic programming was not one of those purposes. To offer sufficient performance for scientific computing, Java must be compiled to native object code, not byte code. To provide genericity, the Java language would have to be changed to include operator overloading and templates. Hmm. Templates, overloading, compilation to native object code.

Can C++ have inner class similar to Java?

FAQ on C/C++/Unix by Roseanne Zhang, Java Programmer Certifi...
They are actually not the same thing! See the following sample code, and read the comments inside, please! #include <iostream> using namespace std; class Outer { public: class Nested { public: Nested(int a):value(a){} void printValue() { cout << "Nested class value: " << value << endl; } private: int value; }; private: Nested *b; }; int main(){ Outer a; // It is not the same as Java Inner class, but the nested top level class // It should be marked as static in Java to be.

What are Perl, C++, ASP, PHP and Java?

DNS Hosting UK
These are all programming languages, that can be run on a web server. Programs or scripts written in these languages, can provide your web site with additional functionality and higher levels of dynamic content.

Is goto statement supported in C#? How about Java?

Mail Test
Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality. No fall-throughs allowed. Unlike the C++ switch statement, C# does not support an explicit fall through from one case label to another. If you want, you can use goto a switch-case, or goto default.

Can I develop a Java EE class library, in C# or VB, and use them in Java projects?

Frequently asked Questions about Mainsoft for Java EE
Yes. You can use Mainsoft for Java EE to create class libraries that can be used from Java development tools as regular Java class libraries. Read Developing a class library to be used in a Java IDE in the online help for details.

How do I translate C/C++ into Java or vice-versa?

Java Programmer's FAQ
In general it is not simple to translate C/C++ into Java, as Java lacks the arbitrary pointer arithmetic of those languages. If your C code does not use pointer arithmetic, automatic translation gets a lot simpler. Try these URLs: http://www.ilog.com/ Going the other way there are currently three freely-available tools to translate Java into C. It seems that these have been done for hacking value, rather than practical purposes. http://www.digiserve.com/nshaylor/jcc.

How to customize indentation in C, C++, and Java buffers?

GNU Emacs FAQ
The Emacs cc-mode features an interactive procedure for customizing the indentation style, which is fully explained in the CC Mode manual that is part of the Emacs distribution, see Customization Indentation. Here's a short summary of the procedure: Go to the beginning of the first line where you don't like the indentation and type C-c C-o. Emacs will prompt you for the syntactic symbol; type <RET> to accept the default it suggests.

Can Java sockets talk to C/C++/Perl/Foo sockets?

Network Systems Programming Notes
Yes. Java sockets use the IP protocols TCP and UDP. These are standard internet sockets, and will work with any sockets that also use TCP and UDP. You've just discovered why people get so excited talking about "open systems". I recommend that you pick up Stevens' book (in the bibliography) for an in depth look at how they work.

Can I compile programs written in Java, C and C++?

Web Hosting&VPS Hosting FAQ's
No, due to the security issues involved with allowing applications to be compiled on the server we do not allow this. Web Hosting | Web Hosting Support | Contact | Linking | Site Map | Acceptable Use | Privacy Policy | Service Agreement
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact