<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Udvikleren.dk - Seneste [boolean] forum tråde</title>
    <description>De seneste forum tråde i [boolean] på Udvikleren.dk</description>
    <link>http://www.udvikleren.dk/</link>
    <pubDate>Wed, 29 Apr 2026 04:50:00 GMT</pubDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Udvikleren.dk RSS Feeder</generator>
    <ttl>60</ttl>
    <item>
      <title>hente værdier fra en anden metode i samme class</title>
      <description>metoderne: twokI() og twokB() returnerer ikke de givne værdier defineret i define()&lt;br /&gt;&lt;br /&gt;Har oprettet denne klasse:&lt;br /&gt;&lt;div class="codeboxheader" id="code_1316452662" onclick="ToggleCodeBox(this.id);"&gt;&lt;img id="code_1316452662_arrow" src="/images/icons/codeboxarrow_down.gif" alt="Fold kodeboks ind/ud" title="Fold kodeboks ind/ud" /&gt;CSharp kode&amp;nbsp;&lt;/div&gt;&lt;pre id="code_1316452662code" style="border-top: 0px; display: none;"&gt;&lt;ol&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Collections.Generic;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Text;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Threading.Tasks;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; yatzy&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; rules&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; Sum;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; n1;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; n2;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;bool&lt;/span&gt;&lt;span style="color: #000000;"&gt; rule_1;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; nameRoll;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; rules(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; aNameRoll)&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        { &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;            nameRoll &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; aNameRoll;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        } &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; lukker rules&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; define(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; an1, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; an2) &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; henter terningeslagene&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;           &lt;/span&gt;&lt;span style="color: #008000;"&gt;/*&lt;/span&gt;&lt;span style="color: #008000;"&gt; n1 = an1;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;            n2 = an2;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;            Sum = n1 + n2; &lt;/span&gt;&lt;span style="color: #008000;"&gt;*/&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;            Sum &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;            rule_1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;true&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;bool&lt;/span&gt;&lt;span style="color: #000000;"&gt; twokB_1()&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;          &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;           &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; rule_1; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; returnerer: false&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; twokI_1()&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; Sum; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; returnerer: 0&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    } &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; lukker public class rules&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;} &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; lukker namespace yatzy&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;</description>
      <link>http://www.udvikleren.dk/forum/46939/hente-vaerdier-fra-en-anden-metode-i-samme-class/</link>
      <pubDate>Sun, 22 May 2016 08:30:58 GMT</pubDate>
    </item>
    <item>
      <title>java-Hvordan converter man "int" til "boolean"</title>
      <description>Hej jeg har lavet denne kode men får fejlen at den ikke kan: converte "svar" fra "int" til "boolean". kan du i hjælpe mig?&lt;br /&gt;&lt;br /&gt;import java.util.Scanner;&lt;br /&gt;public class quiz {&lt;br /&gt;  static void main(String [] args) {&lt;br /&gt;  int svar;&lt;br /&gt;  &lt;br /&gt;  svar = Integer.parseInt(args[0]);&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  System.out.println("hvad er 5+5; ");&lt;br /&gt;  Scanner input = new Scanner(System.in);&lt;br /&gt;  &lt;br /&gt;  svar = input.nextInt();&lt;br /&gt;  &lt;br /&gt;  if(svar = 10){ //fejlen er på denne linje&lt;br /&gt;   System.out.println("korrekt du må være inteligent");&lt;br /&gt;  }else{&lt;br /&gt;   System.out.println("ukorrekt du må være uinteligent");&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;}</description>
      <link>http://www.udvikleren.dk/forum/42794/java-hvordan-converter-man-int-til-boolean/</link>
      <pubDate>Sat, 08 Feb 2014 18:04:32 GMT</pubDate>
    </item>
  </channel>
</rss>