2013年11月18日星期一

JAVA and C

People say that C can be used to develop the pursuit of operational efficiency of the software, and the use of the C language developed projects with small footprints , but these are impossible java and java does not develop over the bottom of things , and why ? Do not understand the reason , please advice !
------ Solution ---------------------------------------- ----
C language is the underlying language , java can be seen as encapsulated in the C above a language !
------ Solution ---------------------------------------- ----
application level is not the same
C compared bottom, you can direct the operating system api
java package higher level of advantage a lot of libraries

As for the specific need to do something to set depends on your needs
can do after all the things assembler , C , too do not you
------ Solution -------------------- ------------------------

efficiency of the program depends on the overall structure of the code , a set of writing C code also sucks same can be much less efficient than java
Main Man , rather than tools
------ Solution ----------------------------- ---------------
java level is relatively high, rich library , programs and libraries basically only deal with the library achieved without specific native layer , which generally consists of c / c + + to achieve.
c language can be called directly via the operating system interface provided by the compiler directly into the corresponding cpu c language compiler script process, and java language is compiled into byte code interpreted by the virtual machine instruction code to be executed , therefore more efficient than java c language high
------ Solution -------------------------------- ------------
C is an art of making money , java is an art of spending money .
java is a series of tools , a mere figurehead , and looks out of the bottom . Farther away from the bottom , of course, the slower the speed , because all operations are ultimately achieved at the bottom .
It is also because java farther away from the bottom , so do not have to focus on the underlying java design, we can take care of more design patterns , the whole situation .

------ Solution ------------------------------------ --------
there is a reasonable , different languages ​​have different useful
------ Solution ------------------ --------------------------
I only know that c is a process-oriented language, and java object-oriented language. I was a novice
------ Solution ------------------------------------- -------
java memory management mechanism limits its performance, so use java to develop the operating system , which requires an extremely high efficiency of the software, at least for now is not possible, but as technology development , java virtual machine technology continues to improve , I believe that java memory management restrictions will gradually reduce or disappear.
C implementation of high efficiency that's for sure , but for the rapid development of large software systems , development efficiency is certainly not with java ratio
------ Solution --------- -----------------------------------
bottom of the system is determined by C written , C is a process-oriented , and process-oriented basis in java Admiral its package. . . . Become an object-oriented , practical realization of the underlying idea is still the C language .
As for the underlying cause can not be developed , java is a cross-platform is based on the JVM , can only operate JVM, JVM where the underlying operating system to achieve , and C or C # directly without going through jvm and dealing with the underlying system , but only under the Windoes . So the pros and cons of high-level language in this. There is no perfect only better , I support java, compared to other languages ​​, and more ... huh .
------ Solution -------------------- ------------------------
java is process-oriented language , based on the package, optimized from , the underlying implementation is still the method c .
java can not be developed for low-level, mainly due to , java is dependent on the JVM , JVM in java and switch between systems right ( not accurate ), java program everything depends on the realization of the JVM, the JVM to go and systems to deal with, so , java and JVM is direct communication with the underlying interaction , depending on the JVM.
C language and the system can deal with the reason why is because the system is written in C, unnecessary middleware like JVM so that it can directly call the systematic method ( insecure ) , but not cross-platform, there are limitations.
java inefficiency problem , java no C higher operating efficiency , because the more the middle of the JVM, however , the efficiency of software development time has a superior advantage, relative to the words , time efficiency of software development is more realistic, operational efficiency is not very different.

java although not as powerful C , but security , cross-platform , he 's powerful enough to meet the real-world problems .
------ Solution -------------------------------------- ------
java and c + + comparability higher.
java and c + + is an object-oriented programming language , where java is fully object-oriented programming language , all code must be encapsulated into classes , c + + both object-oriented , but also process-oriented .
c + + and java to run in a different way , c + + is a fully compiled language , written in code through the compiler links to form executable machine code directly executed by the cpu , java java compiler first be compiled into a java word bytecode , the bytecode jvm interpreted. Can be seen by the means of implementation , c + + compiler executable, high efficient than java .
c + + pointers and io literacy through direct control of the hardware and memory , java jvm to run only on the operating hardware can only use a proxy.
c + + to manipulate memory through a pointer , java jvm memory management through , because c + + flexible without overrun checks , likely to cause memory leaks , java jvm garbage collection mechanism in general does not cause leaks, but if the resource management inadvertently release also cause resources to be locked.
c + + compiler as completely different hardware and operating systems make c + + class library can not be unified package, makes programming the hardware and operating system dependent on large , java class library can be unified package of hardware and operating system relies primarily by jvm to complete, less than pointer manipulation java c + + easy to learn java application development efficiency is higher .
------ For reference only -------------------------------------- -

+
------ For reference only ----------------------------- ----------


what it means.
------ For reference only -------------------------------------- -
, java because only a jvm job because java jvm to run with are , that you have to have a jvm
c java also can do can be done , so they took Saipan system , there are many applications c is the development , used to know ,
same program with c , there are java , but c efficient yes
------ For reference only ----------------- ----------------------

that is the meaning of a floor that does not say is wrong, but not how reasonable
------ For reference only -------------------------------------- -


+1
------ For reference only -------------------------------- -------
I did not understand why so many people always tangled in the end what language to use it, as long as the problem is not on line yet
------ For reference only - --------------------------------------
we should play a more NB metaphor for example, my code is 010101011110001101010000110101010101 this code will have to write what language you want to be able to defeat me ? ?
------ For reference only -------------------------------------- -

write speed of development will be lower on the n-th order of magnitude , while the c language to ensure the efficiency and speed of development
------ For reference only --------- ------------------------------
Oh, classic.

------ For reference only ---------------------------------- -----
two languages ​​are used in different areas , there is nothing like the
------ For reference only ------------------ ---------------------


program execution is to consider the efficiency of operation , see Android is now very fire , and its procedures are generally in java , but I feel a lot of people are using Android in the reaction : android consumes too much , it is very may be with the program efficiency of the bar
------ For reference only ------------------------------ ---------


A lot of people are learning programming in java to go on this road is not long , only C / C + + is eternal
------ For reference only --------- ------------------------------
have a java open source projects , is almost pure java code and a very small amount the operating system written in assembly code - jnode, this system is very slow, partly because I want to have their own virtual machine is achieved without the use of commercial use of a virtual machine, garbage collection algorithms are not very good, it will be slower, but the main reason is the java memory management mechanism caused
------ For reference only ---------------------- -----------------
first java is a high-level language with people even go close to the idea of ​​the efficiency of C high efficient compilation reason is that these languages ​​are closer to machine language
------ For reference only ---------------- -----------------------

+1
------ For reference only ------ ---------------------------------



+1
------ For reference only -------------------------------- -------
compiler-related bar, Java is an interpreted language
------ For reference only ----------------- ----------------------


by looking Refbacks video , I have java memory management mechanisms have a certain understanding , but I do not know what kind of memory management mechanisms, such as C, memory management mechanism is how ? Can explain ? Also between different memory management mechanisms of the application efficiency have any effect ?
------ For reference only -------------------------------------- -
said they do not wear clothes will run faster ,
but did not see Liu Xiang is light the body running .
different languages ​​for different areas ,
why always wanted to swim when wearing padded ,
cold winter wear pants yet.

------ For reference only ------------------------------ ---------
  This reply was moderator deleted at 2012-05-13 22:34:36

------ For reference only ---------------------------------- -----
two languages ​​positioning is different, so different functions ,
Java is C series ,
I prefer the C language.
------ For reference only -------------------------------------- -


in the computer field there is a word called persistent

------ For reference only - -------------------------------------
java in all dealings with the hardware operations are packaged up, you can not directly manipulate hardware.
------ For reference only -------------------------------------- -
thank you for your participation , although some doubt , but through the Citie , C and java I have a better understanding ! Thanks !
------ For reference only ------------------------------ ---------
operating system will now be likened to a river , likened the language jumped into the river to bathe a person ( requirement : not allowed to wear jackets bath ) , and the machine language is like wearing a small underwear ( you can directly jump into the river to bathe ) , assembly language is like wearing a jacket layer people ( need to coat off into the river to bathe ), C / C + + is the equivalent of wearing a two- coat ( into the river in order to bathe the two coats are required to take off ) , and the java is wearing a three- coat person. This is not just a personal present comprehensive understanding , I wonder whether it makes sense !
------ For reference only ------------------------------ ---------
  This reply was moderator deleted at 2012-05-13 21:55:35

------ For reference only ---------------------------------- -----
java is running on the java virtual machine , java virtual machine is also known as JVM (JavaVirtualMachin), JVM is a java program to deal specifically with a particular operating system running on a miniature operating system , each need to execute the java code java code into byte code , and then by the JVM calls the underlying API, the implementation of java bytecode , which more than the middle layer of conversion , let java efficient as C, but with the gradual powerful hardware these efficiency differences are gradually narrowing
------ For reference only ------------------------------- --------
implementation of programming languages ​​and hardware relationship
------ For reference only ----------------- ----------------------
mark liked this technique paste

没有评论:

发表评论