tag:blogger.com,1999:blog-8712770457197348465.post5639391995321450686..comments2024-03-19T01:04:48.783-07:00Comments on Javarevisited: Scala vs Java - Differences and Similaritiesjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-8712770457197348465.post-54513270499982416702019-11-17T09:00:40.544-08:002019-11-17T09:00:40.544-08:00Scala uses java as compiler and generates byte cod...Scala uses java as compiler and generates byte code.then how's it better then java...so it means it just like a framework on top of java. So if you are good java developer than what better then ng does Scala gives?Chander Shekharhttps://www.blogger.com/profile/04588880452903709828noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-59390223749398294502015-09-29T01:26:49.318-07:002015-09-29T01:26:49.318-07:00why invent a new language if you able to add those...why invent a new language if you able to add those missing features in an existing one? looks like Java is bit lazy in supporting those features and scala is sneaking in between.Premhttps://www.blogger.com/profile/12591119528836732255noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-35256182388270071362015-02-17T20:24:13.453-08:002015-02-17T20:24:13.453-08:00Difference between Object Oriented and Functional ...Difference between Object Oriented and Functional Programming<br />Now since Java 8 has some flavors of functional programming, its better Java developer should know key differences between oop and fp. <br /><br />first and foremost difference is their philosophy. Object Oriented programming focus on classes, encapsulation Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-19104607258032361222014-09-02T22:15:39.624-07:002014-09-02T22:15:39.624-07:00Please correct 6th point. I think it should be &qu...Please correct 6th point. I think it should be "You can overload any operator in Scala.." . Thanks for the post.Anonymoushttps://www.blogger.com/profile/06213579430937037566noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-64614331839066136582014-06-12T07:22:19.259-07:002014-06-12T07:22:19.259-07:00in scala returns a negative number tooin scala returns a negative number tooAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-21256515335690208102014-01-08T23:58:39.373-08:002014-01-08T23:58:39.373-08:00Can you spot difference between these two code wri...Can you spot difference between these two code written in Java and Scala?<br /><br />Java:<br />public long add(int a, int b) { return a+b; }<br /><br />Scala:<br />def add(a: Int, b: Int): Long = a+b<br /><br />Both method are accepting two int numbers and adding them, returning result as long, but there is subtle difference between their version in Java and Scala. Java performs integer additionAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-12162338243618928732013-11-23T03:45:52.719-08:002013-11-23T03:45:52.719-08:00@andreaslundblad, well picked up mate. yes you ar...@andreaslundblad, well picked up mate. yes you are correct , I meant Scala there but you are also true on Java 8 context. Since till Java 1.7 we can either pass primitive or object only, passing function to methods will be new and powerful addition in Java 8. It's much like JavaScript, where you pass a function as a parameter to another function. By the way, I did read that stackoverflow Javin @ Java Synchronization tutorialhttp://javarevisited.blogspot.sg/2011/04/synchronization-in-java-synchronized.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-51789524856751725272013-11-23T03:38:13.015-08:002013-11-23T03:38:13.015-08:00@Juan Fernando Fernandez Sanchez , No worry mate, ...@Juan Fernando Fernandez Sanchez , No worry mate, I am sure Spanish Java developers will enjoy your translation.Javin @ Clonning in Javahttp://javarevisited.blogspot.sg/2013/09/how-clone-method-works-in-java.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-29402325002691618972013-11-23T03:36:18.136-08:002013-11-23T03:36:18.136-08:00@Nabeel Memon,Thanks for your comment. I bit agree...@Nabeel Memon,Thanks for your comment. I bit agree with you on that Java 8 will bring more parity with Scala and I could have compared Scala with Java 8, but you do agree with me that almost 80% projects are still in Java 1.6 and lower version. Even Java 1.7 is not fully established in main stream, though I am hoping Java 8 will be gain more ground very quickly as compared to Java 7. It looks Javin @ Java Array Tutorialhttp://javarevisited.blogspot.sg/2013/11/java-array-101-for-programmers-and.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-67400899817237808992013-11-22T23:04:17.081-08:002013-11-22T23:04:17.081-08:00"Another major difference between Java and Sc..."Another major difference between Java and Scala is that functions are objects in Java."<br /><br />Uhm, what? It's kind of true in Java 8, but I would have been less surprised if you said the opposite actually. Is it a typo?<br /><br />"Scala treats any method or function as they are variables."<br /><br />Say what?! A variable is something I can store data in. I can'andreaslundbladhttps://www.blogger.com/profile/08293634175625257224noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-74307828930246705602013-11-22T11:50:21.308-08:002013-11-22T11:50:21.308-08:00Great article. I've translated it to spanish a...Great article. I've translated it to spanish and published in<br /><br />http://elblogdejufe.blogspot.com.es/2013/11/scala-vs-java-diferencias-y-parecidos.html<br /><br />Please, tell me if you don't want this translation available<br />catiahttps://www.blogger.com/profile/00039748423736032103noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-63995583112914132582013-11-21T07:02:33.021-08:002013-11-21T07:02:33.021-08:00I think that's injustice. You should've co...I think that's injustice. You should've compared Java 8 with Scala since Java 8 developer preview has been out in the wild already. Just to give this post's readers a sneak peek, the code snippet in bullet #8) for java would look like this:<br /><br />List doubledEvens = Stream<br /> .iterate(1, i -> i + 1)<br /> .limit(10)<br /> .filter(i -> i % 2 == 0)<br Anonymoushttps://www.blogger.com/profile/04615796837645609607noreply@blogger.com