Solved

c & java

Posted on 2003-11-30
5
396 Views
Last Modified: 2013-11-23
C program compliant with ANSI's C standard is platform independent. Then why is only Java considered platform independent?

What is the difference between new/delete and malloc/free?

Which new keyword was introduced in Java from JDK1.4? List some new features expected in JDK 1.5
 How is J2EE different from J2SE?

What is a deployment descriptor in J2EE terminology?  
What is the purpose of a http-servlet?


Can you call the main function of a C program from another C program

When do you use the 'volatile' keyword in Java?


 What is the difference between new/delete and malloc/free?


0
Comment
Question by:sandipmurmu
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 9846240
Sure sounds like homework.
Perhaps the folowing will help some:

1) What is the output of a C compile/link and what does Java produce?

2) What is passed to 'new' and what is passed to 'malloc'?


0
 
LVL 1

Accepted Solution

by:
abhinaysinha earned 20 total points
ID: 9852320
C produces a executable for the operating system, whereas Java produces a executable for the Java Virtual Machine(JVM).It won't matter whether the JVM is installed on windows or unix or Linux, the compiled code will work if the JVM is installed, whereas in C you have to recompile the code to work for the OS.

Regarding new and malloc, new creates the selected object and pass the pointer to the variable, whereas malloc assigns a memory space of any supplied length, and passes a void pointer to the memory to the variable. free and delete will work with there counterparts.
0
 
LVL 22

Expert Comment

by:cookre
ID: 9854779
abhinaysinha - EE has a policy against giving answers to homework.  We can help, but we can't give explicit answers.  My questions were intended to help steer sandipmurmu towards some of the answers.

0
 
LVL 1

Expert Comment

by:abhinaysinha
ID: 9864865
Oops! My mistake. Thanx for the reminder.
0
 
LVL 4

Expert Comment

by:MobileOakAI
ID: 9893821
another abandoned question

I have a different question: How do you write a program that can split 20 points for dividing amongst six or more questions while applying a responsible grade to the honest contributors to the solutions sought avidly?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB Script to add site to Java Exception List 4 53
nextBoolean(double p) for Random class 3 35
Advice on Xojo as a development tool over VB. 4 40
java stored proc example 9 24
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now