Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

John Ken

Ranch Hand
+ Follow
since Feb 05, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Ken

I want this to be printed like following way:-


   *
  * *
 * * *
* * * *
* * * * *
3 months ago
ok,i got your point but is there any way i can debug line by line to get a feel how compiler is executing instructions written in this program so that it would give me better understanding as i may assume anything as per my limited skills that this should execute 1st then this hen this ..blah,blah..blah then finally this. but if iam able to debug it then it would give me more clarity.

so any idea how could i debug it in notepad or in eclispse?


Thanks
3 months ago
one pseudo code i can think of like 1) print from line 1 to let's say 7
then print 1st star then on each next line keep on increasing one more star until 7th line is reached but shape of pyramid we should have in our mind
3 months ago
but what if i can't write this code then how could i print pyrimid stars?
3 months ago
please find my understanding with respect to print statements sequence:-

3 months ago
also experts please don't feel bad i know with the level of knowledge by which experts can solve these tough issues within minutes despite that they are intentionally prolonging this issue i say them experts because they have expert knowledge that is why they are experts.
also please don't merge *** execise with this topic and let that *** problem in that thread only.

Thanks
3 months ago
it should be employees filtered list based on intended criteria mentioned in my post.


I agree experts do thing they "can" but "will not" --Is it in sync with the spirit of 'friendly place for programming green horns" and if i follow up more than experts start demanding money or start behaving that they are doing some sort of free social service
is it also in sysnc with ''friendly place for programming green horns"
experts please be clear - and either change the tag line 'friendly place for those who are ready to pay'
3 months ago
below is the output:-


F:\Java Training\Java Programs>java  VariableExample
Calling Method
Inside Method
instance variable

I meant to ask that in this program example first System.out.println(myVar) according to my understanding should have been printed as 'instance variable' but  program prints it as 'Calling Method'
I am unable to understand this.
3 months ago
line 9 says "List<String> employeeFilteredList = employeeList.stream()"

and i tried to merge piet's code in previous posts but not sure how to merge it so looking experts guidance for the same but instead of getting guidance so far properly problem is getting worse day by day and still unable to merge and unable to sort ou this issue despite so many experts being present here.
Hope some expert would quickly help to solve all these errors and sort out this issue within next 3 hours soon now??
3 months ago
..Just arranged the same code in proper format here ..




Thanks
3 months ago
Hi,

Any idea why below code does not display 'instance variable first' as it is the first value assigned to my Var here in this example?

[code=java]

public class VariableExample {
  // instance variable
  public String myVar="instance variable";
   
  public void myMethod(){
    // local variable
    String myVar = "Inside Method";
    System.out.println(myVar);
  }
  public static void main(String args[]){
     // Creating object
     VariableExample obj = new VariableExample();
   
     /* We are calling the method, that changes the
      * value of myVar. We are displaying myVar again after
      * the method call, to demonstrate that the local
      * variable scope is limited to the method itself.
      */
     System.out.println("Calling Method");
     obj.myMethod();
     System.out.println(obj.myVar);
  }
}

[/java]
3 months ago
now advised code just prints * 5 times in consecutive 5 lines where is that pyramidPattern?
3 months ago