• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

invalid statements

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

are these both invalid statements
10++11
10+++11
-neha
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to compile it and you'll see what happens

HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Neha Sawant
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes val i had compiled
it gave me ; expected which made me confused.
anyway those statements are invalid.
But i had found something similar in one of the mocks can't recollect which one
thanks for ur help
i really appreciate it
regards
neha
any last minute tip
do u think solving any good mock at last minute will help.
can u mention any other mock besides Marcus green,jtips,javacaps,parikosh
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do u think solving any good mock at last minute will help
try to keep confidence in yourself. taking mocks just before the exam can have a negative effect because if you are nervous and score low in the mock you may loose your confidence for the real exam and that's not good... It may also go well and increase your confidence...
can u mention any other mock besides Marcus green,jtips,javacaps,parikosh
tons of them: http://www.javaranch.com/maha/_Mock_Exams/_mock_exams.html
HIH

------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Neha Sawant
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes val thanks for ur advice
but i need something to do
and i have to pass it at any condition
neha
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another two cents
JLS 3.2


The longest possible translation is used at each step, even if the result does not ultimately make a correct program while another lexical translation would. Thus the input characters a--b are tokenized (�3.5) as a, --, b, which is not part of any grammatically correct program, even though the tokenization a, -, -, b could be part of a grammatically correct program.


System.out.println(10++11);
produces "found value required variable" error because the operator ++ is recognized. However (10+ +11) is ok
Also
System.out.println(10 + + + 11); is ok but
(10++ +11) or (10 ++ +11) are not
 
What are you doing? You are supposed to be reading this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic