Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java as a procedural language

 
Ramprasad Bhat
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like C can simulate OOPs by using the concept of 'struct', can java too have only static methods and private constructors in all classes, pass only primitives and thereby make itself
essentially procedural ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't be able to use String though; you will need to replace it with char[]. You can't use System.out.println() either because that's calling a method of an object. So yes, you can but you will be very, very limited in what you can do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic